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

Class StompServer

SocketServer.BaseServer --+    
                          |    
     SocketServer.TCPServer --+
                              |
                             StompServer

Subclass of StompServer.TCPServer to handle new connections with instances of StompRequestHandler.

Instance Methods
 
__init__(self, server_address, RequestHandlerClass=None, timeout=3.0, authenticator=None, queue_manager=None, topic_manager=None)
Extension to TCPServer constructor to provide mechanism for providing implementation classes.
 
server_close(self)
Closes the socket server and any associated resources.
 
shutdown(self)
Stops the serve_forever loop.
 
serve_forever(self, poll_interval=0.5)
Handle one request at a time until shutdown.

Inherited from SocketServer.TCPServer: close_request, fileno, get_request, server_activate, server_bind, shutdown_request

Inherited from SocketServer.BaseServer: finish_request, handle_error, handle_request, handle_timeout, process_request, verify_request

Class Variables
  allow_reuse_address = True

Inherited from SocketServer.TCPServer: address_family, request_queue_size, socket_type

Inherited from SocketServer.BaseServer: timeout

Instance Variables
coilmq.auth.Authenticator authenticator
The authenticator to use.
coilmq.queue.QueueManager queue_manager
The queue manager to use.
coilmq.topic.TopicManager topic_manager
The topic manager to use.
Method Details

__init__(self, server_address, RequestHandlerClass=None, timeout=3.0, authenticator=None, queue_manager=None, topic_manager=None)
(Constructor)

 

Extension to TCPServer constructor to provide mechanism for providing implementation classes.

Parameters:
Overrides: SocketServer.BaseServer.__init__

server_close(self)

 

Closes the socket server and any associated resources.

Overrides: SocketServer.BaseServer.server_close

shutdown(self)

 

Stops the serve_forever loop.

Blocks until the loop has finished. This must be called while serve_forever() is running in another thread, or it will deadlock.

Overrides: SocketServer.BaseServer.shutdown
(inherited documentation)

serve_forever(self, poll_interval=0.5)

 

Handle one request at a time until shutdown.

Polls for shutdown every poll_interval seconds. Ignores self.timeout. If you need to do periodic tasks, do them in another thread.

Overrides: SocketServer.BaseServer.serve_forever