Package org.apache.qpid.jms.provider
Class DefaultProviderListener
java.lang.Object
org.apache.qpid.jms.provider.DefaultProviderListener
- All Implemented Interfaces:
ProviderListener
- Direct Known Subclasses:
FailoverProvider
Default implementation that does nothing for all callbacks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled 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.voidonConnectionEstablished(URI remoteURI) Called to indicate that the underlying connection to the Broker has been established for the first time.voidCalled to indicate that the underlying connection to the Broker has been lost and the Provider will not perform any reconnect.voidonConnectionInterrupted(URI remoteURI) Called from a fault tolerant Provider instance to signal that the underlying connection to the Broker has been lost.voidonConnectionRecovered(Provider provider) 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.voidonConnectionRecovery(Provider provider) Called to indicate that a connection to the Broker has been reestablished and that notified listener should start to recover it's state.voidonConnectionRestored(URI remoteURI) Called to signal that all recovery operations are now complete and the Provider is again in a normal connected state.voidonFailedMessageSend(JmsOutboundMessageDispatch envelope, ProviderException cause) Called when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered failed.voidonInboundMessage(JmsInboundMessageDispatch envelope) Called when a new Message has arrived for a registered consumer.voidCalled to indicate that a some client operation caused or received an error that is not considered fatal at the provider level.voidonResourceClosed(JmsResource resource, ProviderException cause) Called to indicate that a currently active resource has been closed due to some error condition, management request or some other action.
-
Constructor Details
-
DefaultProviderListener
public DefaultProviderListener()
-
-
Method Details
-
onInboundMessage
Description copied from interface:ProviderListenerCalled when a new Message has arrived for a registered consumer.- Specified by:
onInboundMessagein interfaceProviderListener- Parameters:
envelope- The dispatch object containing the message and delivery information.
-
onCompletedMessageSend
Description copied from interface:ProviderListenerCalled 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:
onCompletedMessageSendin interfaceProviderListener- Parameters:
envelope- the original outbound message dispatch that is now complete.
-
onFailedMessageSend
Description copied from interface:ProviderListenerCalled when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered failed.- Specified by:
onFailedMessageSendin interfaceProviderListener- 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
Description copied from interface:ProviderListenerCalled 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:
onConnectionInterruptedin interfaceProviderListener- Parameters:
remoteURI- The URI of the Broker whose connection was lost.
-
onConnectionEstablished
Description copied from interface:ProviderListenerCalled 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:
onConnectionEstablishedin interfaceProviderListener- Parameters:
remoteURI- The URI of the Broker that the client has now connected to.
-
onConnectionFailure
Description copied from interface:ProviderListenerCalled 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:
onConnectionFailurein interfaceProviderListener- Parameters:
ex- The exception that indicates the cause of this Provider failure.
-
onConnectionRecovery
Description copied from interface:ProviderListenerCalled 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:
onConnectionRecoveryin interfaceProviderListener- Parameters:
provider- The new Provider instance that will become active after the state has been recovered.
-
onConnectionRecovered
Description copied from interface:ProviderListenerCalled 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:
onConnectionRecoveredin interfaceProviderListener- Parameters:
provider- The new Provider instance that will become active after the state has been recovered.
-
onConnectionRestored
Description copied from interface:ProviderListenerCalled 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:
onConnectionRestoredin interfaceProviderListener- Parameters:
remoteURI- The URI of the Broker that the client has now connected to.
-
onResourceClosed
Description copied from interface:ProviderListenerCalled 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:
onResourceClosedin interfaceProviderListener- Parameters:
resource- the JmsResource instance that has been closed.cause- optional exception object that indicates the cause of the close.
-
onProviderException
Description copied from interface:ProviderListenerCalled to indicate that a some client operation caused or received an error that is not considered fatal at the provider level.- Specified by:
onProviderExceptionin interfaceProviderListener- Parameters:
cause- the exception object that is being reported to the listener.
-