public class DefaultProviderListener extends Object implements ProviderListener
Constructor and Description |
---|
DefaultProviderListener() |
Modifier and Type | Method and Description |
---|---|
void |
onConnectionEstablished(URI remoteURI)
Called to indicate that the underlying connection to the Broker has been established
for the first time.
|
void |
onConnectionFailure(IOException ex)
Called to indicate that the underlying connection to the Broker has been lost and
the Provider will not perform any reconnect.
|
void |
onConnectionInterrupted(URI remoteURI)
Called from a fault tolerant Provider instance to signal that the underlying
connection to the Broker has been lost.
|
void |
onConnectionRecovered(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.
|
void |
onConnectionRecovery(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.
|
void |
onConnectionRestored(URI remoteURI)
Called to signal that all recovery operations are now complete and the Provider
is again in a normal connected state.
|
void |
onInboundMessage(JmsInboundMessageDispatch envelope)
Called when a new Message has arrived for a registered consumer.
|
void |
onProviderException(Exception cause)
Called to indicate that a some client operation caused or received an
error that is not considered fatal at the provider level.
|
void |
onResourceRemotelyClosed(JmsResource resource,
Exception cause)
Called to indicate that a currently active resource has been closed on the
remote end due to management or other action.
|
public void onInboundMessage(JmsInboundMessageDispatch envelope)
ProviderListener
onInboundMessage
in interface ProviderListener
envelope
- The dispatch object containing the message and delivery information.public void onConnectionInterrupted(URI remoteURI)
ProviderListener
onConnectionInterrupted
in interface ProviderListener
remoteURI
- The URI of the Broker whose connection was lost.public void onConnectionEstablished(URI remoteURI)
ProviderListener
onConnectionEstablished
in interface ProviderListener
remoteURI
- The URI of the Broker that the client has now connected to.public void onConnectionFailure(IOException ex)
ProviderListener
onConnectionFailure
in interface ProviderListener
ex
- The exception that indicates the cause of this Provider failure.public void onConnectionRecovery(Provider provider)
ProviderListener
onConnectionRecovery
in interface ProviderListener
provider
- The new Provider instance that will become active after the state
has been recovered.public void onConnectionRecovered(Provider provider)
ProviderListener
onConnectionRecovered
in interface ProviderListener
provider
- The new Provider instance that will become active after the state
has been recovered.public void onConnectionRestored(URI remoteURI)
ProviderListener
onConnectionRestored
in interface ProviderListener
remoteURI
- The URI of the Broker that the client has now connected to.public void onResourceRemotelyClosed(JmsResource resource, Exception cause)
ProviderListener
onResourceRemotelyClosed
in interface ProviderListener
resource
- the JmsResource instance that has been remotely closed.cause
- optional exception object that indicates the cause of the close.public void onProviderException(Exception cause)
ProviderListener
onProviderException
in interface ProviderListener
cause
- the exception object that is being reported to the listener.Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.