Class DefaultProviderListener

java.lang.Object
org.apache.qpid.jms.provider.DefaultProviderListener
All Implemented Interfaces:
ProviderListener
Direct Known Subclasses:
FailoverProvider

public class DefaultProviderListener extends Object implements ProviderListener
Default implementation that does nothing for all callbacks.
  • Constructor Details

    • DefaultProviderListener

      public DefaultProviderListener()
  • Method Details

    • onInboundMessage

      public void onInboundMessage(JmsInboundMessageDispatch envelope)
      Description copied from interface: ProviderListener
      Called when a new Message has arrived for a registered consumer.
      Specified by:
      onInboundMessage in interface ProviderListener
      Parameters:
      envelope - The dispatch object containing the message and delivery information.
    • onCompletedMessageSend

      public void onCompletedMessageSend(JmsOutboundMessageDispatch envelope)
      Description copied from interface: ProviderListener
      Called when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered successful based on the QoS level associated of the outbound message.
      Specified by:
      onCompletedMessageSend in interface ProviderListener
      Parameters:
      envelope - the original outbound message dispatch that is now complete.
    • onFailedMessageSend

      public void onFailedMessageSend(JmsOutboundMessageDispatch envelope, ProviderException cause)
      Description copied from interface: ProviderListener
      Called when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered failed.
      Specified by:
      onFailedMessageSend in interface ProviderListener
      Parameters:
      envelope - the original outbound message dispatch that should be treated as a failed send.
      cause - the exception that describes the cause of the failed send.
    • onConnectionInterrupted

      public void onConnectionInterrupted(URI remoteURI)
      Description copied from interface: ProviderListener
      Called from a fault tolerant Provider instance to signal that the underlying connection to the Broker has been lost. The Provider will attempt to reconnect following this event unless closed. It is considered a programming error to allow any exceptions to be thrown from this notification method.
      Specified by:
      onConnectionInterrupted in interface ProviderListener
      Parameters:
      remoteURI - The URI of the Broker whose connection was lost.
    • onConnectionEstablished

      public void onConnectionEstablished(URI remoteURI)
      Description copied from interface: ProviderListener
      Called to indicate that the underlying connection to the Broker has been established for the first time. For a fault tolerant provider this event should only ever be triggered once with the interruption and recovery events following on for future
      Specified by:
      onConnectionEstablished in interface ProviderListener
      Parameters:
      remoteURI - The URI of the Broker that the client has now connected to.
    • onConnectionFailure

      public void onConnectionFailure(ProviderException ex)
      Description copied from interface: ProviderListener
      Called to indicate that the underlying connection to the Broker has been lost and the Provider will not perform any reconnect. Following this call the provider is in a failed state and further calls to it will throw an Exception.
      Specified by:
      onConnectionFailure in interface ProviderListener
      Parameters:
      ex - The exception that indicates the cause of this Provider failure.
    • onConnectionRecovery

      public void onConnectionRecovery(Provider provider)
      Description copied from interface: ProviderListener
      Called to indicate that a connection to the Broker has been reestablished and that notified listener should start to recover it's state. The provider will not transition to the recovered state until the listener notifies the provider that recovery is complete.
      Specified by:
      onConnectionRecovery in interface ProviderListener
      Parameters:
      provider - The new Provider instance that will become active after the state has been recovered.
    • onConnectionRecovered

      public void onConnectionRecovered(Provider provider)
      Description copied from interface: ProviderListener
      Called to indicate that a connection to the Broker has been reestablished and that all recovery operations have succeeded and the connection will now be transitioned to a recovered state. This method gives the listener a chance so send any necessary post recovery commands such as consumer start or message pull for a zero prefetch consumer etc.
      Specified by:
      onConnectionRecovered in interface ProviderListener
      Parameters:
      provider - The new Provider instance that will become active after the state has been recovered.
    • onConnectionRestored

      public void onConnectionRestored(URI remoteURI)
      Description copied from interface: ProviderListener
      Called to signal that all recovery operations are now complete and the Provider is again in a normal connected state. It is considered a programming error to allow any exceptions to be thrown from this notification method.
      Specified by:
      onConnectionRestored in interface ProviderListener
      Parameters:
      remoteURI - The URI of the Broker that the client has now connected to.
    • onResourceClosed

      public void onResourceClosed(JmsResource resource, ProviderException cause)
      Description copied from interface: ProviderListener
      Called to indicate that a currently active resource has been closed due to some error condition, management request or some other action. This can either be initiated remotely or locally depending on the condition that triggers the close.
      Specified by:
      onResourceClosed in interface ProviderListener
      Parameters:
      resource - the JmsResource instance that has been closed.
      cause - optional exception object that indicates the cause of the close.
    • onProviderException

      public void onProviderException(ProviderException cause)
      Description copied from interface: ProviderListener
      Called to indicate that a some client operation caused or received an error that is not considered fatal at the provider level.
      Specified by:
      onProviderException in interface ProviderListener
      Parameters:
      cause - the exception object that is being reported to the listener.