Package org.apache.qpid.jms
Interface JmsConnectionListener
-
public interface JmsConnectionListenerProviders an interface for client's to listener to events related to an JmsConnection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonConnectionEstablished(java.net.URI remoteURI)Called when a connection has been successfully established.voidonConnectionFailure(java.lang.Throwable error)Called when an unrecoverable error occurs and the Connection must be closed.voidonConnectionInterrupted(java.net.URI remoteURI)Called when the Connection to the remote peer is lost.voidonConnectionRestored(java.net.URI remoteURI)Called when normal communication has been restored to a remote peer.voidonConsumerClosed(jakarta.jms.MessageConsumer consumer, java.lang.Throwable cause)Called when the MessageConsumer is closed due to remote action or local error detection.voidonInboundMessage(JmsInboundMessageDispatch envelope)Called when a Connection is notified that a new Message has arrived for one of it's currently active subscriptions.voidonProducerClosed(jakarta.jms.MessageProducer producer, java.lang.Throwable cause)Called when the MessageProducer is closed due to remote action or local error detection.voidonSessionClosed(jakarta.jms.Session session, java.lang.Throwable cause)Called when the session is closed due to remote action or local error detection.
-
-
-
Method Detail
-
onConnectionEstablished
void onConnectionEstablished(java.net.URI remoteURI)
Called when a connection has been successfully established. This method is never called more than once when using a fault tolerant connection, instead the connection will signal interrupted and restored.- Parameters:
remoteURI- The URI of the Broker this client is now connected to.
-
onConnectionFailure
void onConnectionFailure(java.lang.Throwable error)
Called when an unrecoverable error occurs and the Connection must be closed.- Parameters:
error- The error that triggered the failure.
-
onConnectionInterrupted
void onConnectionInterrupted(java.net.URI remoteURI)
Called when the Connection to the remote peer is lost.- Parameters:
remoteURI- The URI of the Broker previously connected to.
-
onConnectionRestored
void onConnectionRestored(java.net.URI remoteURI)
Called when normal communication has been restored to a remote peer.- Parameters:
remoteURI- The URI of the Broker that this client is now connected to.
-
onInboundMessage
void onInboundMessage(JmsInboundMessageDispatch envelope)
Called when a Connection is notified that a new Message has arrived for one of it's currently active subscriptions.- Parameters:
envelope- The envelope that contains the incoming message and it's delivery information.
-
onSessionClosed
void onSessionClosed(jakarta.jms.Session session, java.lang.Throwable cause)Called when the session is closed due to remote action or local error detection.- Parameters:
session- The session that was closed and needs to be cleaned up.cause- The exception that provides additional context on the closure.
-
onConsumerClosed
void onConsumerClosed(jakarta.jms.MessageConsumer consumer, java.lang.Throwable cause)Called when the MessageConsumer is closed due to remote action or local error detection.- Parameters:
consumer- The consumer that was closed and needs to be cleaned up.cause- The exception that provides additional context on the closure.
-
onProducerClosed
void onProducerClosed(jakarta.jms.MessageProducer producer, java.lang.Throwable cause)Called when the MessageProducer is closed due to remote action or local error detection.- Parameters:
producer- The producer that was closed and needs to be cleaned up.cause- The exception that provides additional context on the closure.
-
-