Package coilmq :: Package server :: Module socketserver :: Class StompRequestHandler
[frames] | no frames]

Class StompRequestHandler

SocketServer.BaseRequestHandler --+
                                  |
                     object --+   |
                              |   |
                StompConnection --+
                                  |
                                 StompRequestHandler

Class that will be instantiated to handle STOMP connections.

This class will be instantiated once per connection to the server. In a multi-threaded context, that means that instances of this class are scoped to a single thread. It should be noted that while the coilmq.engine.StompEngine instance will be thread-local, the storage containers configured into the engine are not thread-local (and hence must be thread-safe).

Instance Methods
 
setup(self)
 
handle(self)
Handle a new socket connection.
 
finish(self)
Normal (non-error) termination of request.
 
send_frame(self, frame)
Sends a frame to connected socket client.

Inherited from SocketServer.BaseRequestHandler: __init__

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

Class Variables

Inherited from StompConnection: __metaclass__

Instance Variables
stompclient.util.FrameBuffer buffer
A StompBuffer instance which buffers received data (to ensure we deal with complete STOMP messages.
bool debug
Whether to enable extra-verbose debug logging.
coilmq.engine.StompEngine engine
The STOMP protocol engine.

Inherited from StompConnection: reliable_subscriber

Properties

Inherited from object: __class__

Method Details

setup(self)

 
Overrides: SocketServer.BaseRequestHandler.setup

handle(self)

 

Handle a new socket connection.

Overrides: SocketServer.BaseRequestHandler.handle

finish(self)

 

Normal (non-error) termination of request.

Unbinds the engine.

Overrides: SocketServer.BaseRequestHandler.finish

send_frame(self, frame)

 

Sends a frame to connected socket client.

Parameters:
  • frame (stompclient.frame.Frame) - The frame to send.
Overrides: StompConnection.send_frame

Instance Variable Details

debug

Whether to enable extra-verbose debug logging. (Will be logged at debug level.)
Type:
bool