Class CompositeConnectionListener
java.lang.Object
org.springframework.amqp.rabbit.connection.CompositeConnectionListener
- All Implemented Interfaces:
ConnectionListener
A composite listener that invokes its delegages in turn.
- Author:
- Dave Syer, Gary Russell
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDelegate
(ConnectionListener delegate) void
void
onClose
(Connection connection) Called when a connection is closed.void
onCreate
(Connection connection) Called when a new connection is established.void
Called when a connection couldn't be established.void
onShutDown
(com.rabbitmq.client.ShutdownSignalException signal) Called when a connection is force closed.boolean
removeDelegate
(ConnectionListener delegate) void
setDelegates
(List<? extends ConnectionListener> delegates)
-
Constructor Details
-
CompositeConnectionListener
public CompositeConnectionListener()
-
-
Method Details
-
onCreate
Description copied from interface:ConnectionListener
Called when a new connection is established.- Specified by:
onCreate
in interfaceConnectionListener
- Parameters:
connection
- the connection.
-
onClose
Description copied from interface:ConnectionListener
Called when a connection is closed.- Specified by:
onClose
in interfaceConnectionListener
- Parameters:
connection
- the connection.- See Also:
-
onShutDown
public void onShutDown(com.rabbitmq.client.ShutdownSignalException signal) Description copied from interface:ConnectionListener
Called when a connection is force closed.- Specified by:
onShutDown
in interfaceConnectionListener
- Parameters:
signal
- the shut down signal.
-
onFailed
Description copied from interface:ConnectionListener
Called when a connection couldn't be established.- Specified by:
onFailed
in interfaceConnectionListener
- Parameters:
exception
- the exception thrown.
-
setDelegates
-
addDelegate
-
removeDelegate
-
clearDelegates
public void clearDelegates()
-