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.
@FunctionalInterface public interface ConnectionListener
A listener for connection creation and closing.- Author:
- Dave Syer, Gary Russell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
onClose(Connection connection)
Called when a connection is closed.void
onCreate(Connection connection)
Called when a new connection is established.default void
onFailed(Exception exception)
Called when a connection couldn't be established.default void
onShutDown(com.rabbitmq.client.ShutdownSignalException signal)
Called when a connection is force closed.
-
-
-
Method Detail
-
onCreate
void onCreate(Connection connection)
Called when a new connection is established.- Parameters:
connection
- the connection.
-
onClose
default void onClose(Connection connection)
Called when a connection is closed.- Parameters:
connection
- the connection.- See Also:
onShutDown(ShutdownSignalException)
-
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
default void onFailed(Exception exception)
Called when a connection couldn't be established.- Parameters:
exception
- the exception thrown.- Since:
- 2.2.17
-
-