Class CompositeConnectionListener
- java.lang.Object
-
- org.springframework.amqp.rabbit.connection.CompositeConnectionListener
-
- All Implemented Interfaces:
ConnectionListener
public class CompositeConnectionListener extends java.lang.Object implements ConnectionListener
A composite listener that invokes its delegages in turn.
-
-
Constructor Summary
Constructors Constructor Description CompositeConnectionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDelegate(ConnectionListener delegate)voidclearDelegates()voidonClose(Connection connection)Called when a connection is closed.voidonCreate(Connection connection)Called when a new connection is established.voidonFailed(java.lang.Exception exception)Called when a connection couldn't be established.voidonShutDown(com.rabbitmq.client.ShutdownSignalException signal)Called when a connection is force closed.booleanremoveDelegate(ConnectionListener delegate)voidsetDelegates(java.util.List<? extends ConnectionListener> delegates)
-
-
-
Method Detail
-
onCreate
public void onCreate(Connection connection)
Description copied from interface:ConnectionListenerCalled when a new connection is established.- Specified by:
onCreatein interfaceConnectionListener- Parameters:
connection- the connection.
-
onClose
public void onClose(Connection connection)
Description copied from interface:ConnectionListenerCalled when a connection is closed.- Specified by:
onClosein interfaceConnectionListener- Parameters:
connection- the connection.- See Also:
ConnectionListener.onShutDown(ShutdownSignalException)
-
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
public void onFailed(java.lang.Exception exception)
Description copied from interface:ConnectionListenerCalled when a connection couldn't be established.- Specified by:
onFailedin interfaceConnectionListener- Parameters:
exception- the exception thrown.
-
setDelegates
public void setDelegates(java.util.List<? extends ConnectionListener> delegates)
-
addDelegate
public void addDelegate(ConnectionListener delegate)
-
removeDelegate
public boolean removeDelegate(ConnectionListener delegate)
-
clearDelegates
public void clearDelegates()
-
-