Interface ConnectionListener
- All Known Implementing Classes:
BrokerEventListener
,CompositeConnectionListener
,DeclareExchangeConnectionListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A listener for connection creation and closing.
- Author:
- Dave Syer, Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onClose
(Connection connection) Called when a connection is closed.void
onCreate
(Connection connection) Called when a new connection is established.default void
Called when a connection couldn't be established.default void
onShutDown
(com.rabbitmq.client.ShutdownSignalException signal) Called when a connection is force closed.
-
Method Details
-
onCreate
Called when a new connection is established.- Parameters:
connection
- the connection.
-
onClose
Called when a connection is closed.- Parameters:
connection
- the connection.- See Also:
-
onShutDown
default void onShutDown(com.rabbitmq.client.ShutdownSignalException signal) Called when a connection is force closed.- Parameters:
signal
- the shut down signal.- Since:
- 2.0
-
onFailed
Called when a connection couldn't be established.- Parameters:
exception
- the exception thrown.- Since:
- 2.2.17
-