Package net.jodah.lyra.event
Interface ConnectionListener
- All Known Implementing Classes:
DefaultConnectionListener
public interface ConnectionListener
Listens for
Connection
related events.-
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.
-
Method Details
-
onCreate
void onCreate(com.rabbitmq.client.Connection connection)Called when theconnection
is successfully created. -
onCreateFailure
void onCreateFailure(java.lang.Throwable failure)Called when connection creation fails. -
onRecoveryStarted
void onRecoveryStarted(com.rabbitmq.client.Connection connection)Called when recovery of theconnection
is started. -
onRecovery
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. -
onRecoveryCompleted
void onRecoveryCompleted(com.rabbitmq.client.Connection connection)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
. -
onRecoveryFailure
void onRecoveryFailure(com.rabbitmq.client.Connection connection, java.lang.Throwable failure)Called when theconnection
fails to recover from an unexpected closure.
-