Interface JmsConnectionListener


  • public interface JmsConnectionListener
    Providers an interface for client's to listener to events related to an JmsConnection.
    • Method Detail

      • onConnectionEstablished

        void onConnectionEstablished​(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​(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​(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​(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​(javax.jms.Session session,
                             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​(javax.jms.MessageConsumer consumer,
                              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​(javax.jms.MessageProducer producer,
                              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.