Package coilmq :: Module engine :: Class StompEngine
[frames] | no frames]

Class StompEngine

object --+
         |
        StompEngine

The engine provides the core business logic that we use to respond to STOMP protocol messages.

This class is transport-agnostic; it exposes methods that expect STOMP frames and uses the attached connection to send frames to connected clients.

Instance Methods
 
__init__(self, connection, authenticator, queue_manager, topic_manager)
x.__init__(...) initializes x; see help(type(x)) for signature
 
process_frame(self, frame)
Dispatches a received frame to the appropriate internal method.
 
connect(self, frame)
Handle CONNECT command: Establishes a new connection and checks auth (if applicable).
 
send(self, frame)
Handle the SEND command: Delivers a message to a queue or topic (default).
 
subscribe(self, frame)
Handle the SUBSCRIBE command: Adds this connection to destination.
 
unsubscribe(self, frame)
Handle the UNSUBSCRIBE command: Removes this connection from destination.
 
begin(self, frame)
Handles BEGING command: Starts a new transaction.
 
commit(self, frame)
Handles COMMIT command: Commits specified transaction.
 
abort(self, frame)
Handles ABORT command: Rolls back specified transaction.
 
ack(self, frame)
Handles the ACK command: Acknowledges receipt of a message.
 
disconnect(self, frame)
Handles the DISCONNECT command: Unbinds the connection.
 
unbind(self)
Unbinds this connection from queue and topic managers (freeing up resources) and resets state.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables
coilmq.auth.Authenticator authenticator
An Authenticator implementation to use.
bool connected
Whether engine is connected.
coilmq.server.StompConnection connection
The connection (aka "protocol") backing this engine.
coilmq.queue.QueueManager queue_manager
The QueueManager implementation to use.
coilmq.topic.TopicManager topic_manager
The TopicManager implementation to use.
dict of str to list transactions
Active transactions for this connection.
Properties

Inherited from object: __class__

Method Details

__init__(self, connection, authenticator, queue_manager, topic_manager)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
Overrides: object.__init__

process_frame(self, frame)

 

Dispatches a received frame to the appropriate internal method.

Parameters:
  • frame (stompclient.frame.Frame) - The frame that was received.

disconnect(self, frame)

 

Handles the DISCONNECT command: Unbinds the connection.

Clients are supposed to send this command, but in practice it should not be relied upon.


Instance Variable Details

authenticator

An Authenticator implementation to use. Setting this value will implicitly cause authentication to be required.
Type:
coilmq.auth.Authenticator