Package net.jodah.lyra.event
Class DefaultConnectionListener
java.lang.Object
net.jodah.lyra.event.DefaultConnectionListener
- All Implemented Interfaces:
ConnectionListener
public abstract class DefaultConnectionListener extends java.lang.Object implements ConnectionListener
No-op connection listener for sub-classing.
-
Constructor Summary
Constructors Constructor Description DefaultConnectionListener()
-
Method Summary
Modifier and Type Method Description void
onCreate(com.rabbitmq.client.Connection connection)
Called when theconnection
is successfully created.void
onCreateFailure(java.lang.Throwable failure)
Called when connection creation fails.void
onRecovery(com.rabbitmq.client.Connection connection)
Called when theconnection
is successfully recovered from an unexpected closure, but before its associated exchanges, queues, bindings, channels and consumers are recovered.void
onRecoveryCompleted(com.rabbitmq.client.Connection connection)
Called when recovery of theconnection
and its associated resources is completed.void
onRecoveryFailure(com.rabbitmq.client.Connection connection, java.lang.Throwable failure)
Called when theconnection
fails to recover from an unexpected closure.void
onRecoveryStarted(com.rabbitmq.client.Connection connection)
Called when recovery of theconnection
is started.
-
Constructor Details
-
DefaultConnectionListener
public DefaultConnectionListener()
-
-
Method Details
-
onCreate
public void onCreate(com.rabbitmq.client.Connection connection)Description copied from interface:ConnectionListener
Called when theconnection
is successfully created.- Specified by:
onCreate
in interfaceConnectionListener
-
onCreateFailure
public void onCreateFailure(java.lang.Throwable failure)Description copied from interface:ConnectionListener
Called when connection creation fails.- Specified by:
onCreateFailure
in interfaceConnectionListener
-
onRecovery
public void onRecovery(com.rabbitmq.client.Connection connection)Description copied from interface:ConnectionListener
Called when theconnection
is successfully recovered from an unexpected closure, but before its associated exchanges, queues, bindings, channels and consumers are recovered.- Specified by:
onRecovery
in interfaceConnectionListener
-
onRecoveryCompleted
public void onRecoveryCompleted(com.rabbitmq.client.Connection connection)Description copied from interface:ConnectionListener
Called when recovery of theconnection
and its associated resources is completed. Note: The success of failure of an individual channel's recovery can be tracked with aChannelListener
.- Specified by:
onRecoveryCompleted
in interfaceConnectionListener
-
onRecoveryFailure
public void onRecoveryFailure(com.rabbitmq.client.Connection connection, java.lang.Throwable failure)Description copied from interface:ConnectionListener
Called when theconnection
fails to recover from an unexpected closure.- Specified by:
onRecoveryFailure
in interfaceConnectionListener
-
onRecoveryStarted
public void onRecoveryStarted(com.rabbitmq.client.Connection connection)Description copied from interface:ConnectionListener
Called when recovery of theconnection
is started.- Specified by:
onRecoveryStarted
in interfaceConnectionListener
-