pyicat_plus.tests.servers.stomp_subscriber.MyListener#
- class pyicat_plus.tests.servers.stomp_subscriber.MyListener(conn, icat_data_dir=None)[source]#
Bases:
ConnectionListener
- Parameters:
icat_data_dir (
Optional
[str
])
- on_before_message(frame)#
Called by the STOMP connection before a message is returned to the client app. Returns a tuple containing the headers and body (so that implementing listeners can pre-process the content).
- Parameters:
frame (Frame) – the stomp frame
- on_connected(frame)#
Called by the STOMP connection when a CONNECTED frame is received (after a connection has been established or re-established).
- Parameters:
frame (Frame) – the stomp frame
- on_connecting(host_and_port)#
Called by the STOMP connection once a TCP/IP connection to the STOMP server has been established or re-established. Note that at this point, no connection has been established on the STOMP protocol level. For this, you need to invoke the “connect” method on the connection.
- Parameters:
host_and_port ((str,int)) – a tuple containing the host name and port number to which the connection has been established.
- on_disconnected()#
Called by the STOMP connection when a TCP/IP connection to the STOMP server has been lost. No messages should be sent via the connection until it has been reestablished.
- on_disconnecting()#
Called before a DISCONNECT frame is sent.
- on_error(frame)#
Called by the STOMP connection when an ERROR frame is received.
- Parameters:
frame (Frame) – the stomp frame
- on_heartbeat()#
Called on receipt of a heartbeat.
- on_heartbeat_timeout()#
Called by the STOMP connection when a heartbeat message has not been received beyond the specified period.
- on_message(frame)[source]#
Called by the STOMP connection when a MESSAGE frame is received.
- Parameters:
frame (Frame) – the stomp frame
- on_receipt(frame)#
Called by the STOMP connection when a RECEIPT frame is received, sent by the server if requested by the client using the ‘receipt’ header.
- Parameters:
frame (Frame) – the stomp frame
- on_receiver_loop_completed(frame)#
Called when the connection receiver_loop has finished.
- on_send(frame)#
Called by the STOMP connection when it is in the process of sending a message
- Parameters:
frame (Frame) – the stomp frame