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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDelegate(ConnectionListener delegate) voidvoidonClose(Connection connection) Called when a connection is closed.voidonCreate(Connection connection) Called when a new connection is established.voidCalled when a connection couldn't be established.voidonShutDown(com.rabbitmq.client.ShutdownSignalException signal) Called when a connection is force closed.booleanremoveDelegate(ConnectionListener delegate) voidsetDelegates(List<? extends ConnectionListener> delegates)
-
Constructor Details
-
CompositeConnectionListener
public CompositeConnectionListener()
-
-
Method Details
-
onCreate
Description copied from interface:ConnectionListenerCalled when a new connection is established.- Specified by:
onCreatein interfaceConnectionListener- Parameters:
connection- the connection.
-
onClose
Description copied from interface:ConnectionListenerCalled when a connection is closed.- Specified by:
onClosein interfaceConnectionListener- Parameters:
connection- the connection.- See Also:
-
onShutDown
public void onShutDown(com.rabbitmq.client.ShutdownSignalException signal) Description copied from interface:ConnectionListenerCalled when a connection is force closed.- Specified by:
onShutDownin interfaceConnectionListener- Parameters:
signal- the shut down signal.
-
onFailed
Description copied from interface:ConnectionListenerCalled when a connection couldn't be established.- Specified by:
onFailedin interfaceConnectionListener- Parameters:
exception- the exception thrown.
-
setDelegates
-
addDelegate
-
removeDelegate
-
clearDelegates
public void clearDelegates()
-