Class CompositeConnectionListener
- java.lang.Object
-
- org.springframework.amqp.rabbit.connection.CompositeConnectionListener
-
- All Implemented Interfaces:
ConnectionListener
public class CompositeConnectionListener extends Object implements ConnectionListener
A composite listener that invokes its delegages in turn.- Author:
- Dave Syer, Gary Russell
-
-
Constructor Summary
Constructors Constructor Description CompositeConnectionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDelegate(ConnectionListener delegate)
void
clearDelegates()
void
onClose(Connection connection)
Called when a connection is closed.void
onCreate(Connection connection)
Called when a new connection is established.void
onFailed(Exception exception)
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)
-
-
-
Method Detail
-
onCreate
public void onCreate(Connection connection)
Description copied from interface:ConnectionListener
Called when a new connection is established.- Specified by:
onCreate
in interfaceConnectionListener
- Parameters:
connection
- the connection.
-
onClose
public void onClose(Connection connection)
Description copied from interface:ConnectionListener
Called when a connection is closed.- Specified by:
onClose
in interfaceConnectionListener
- Parameters:
connection
- the connection.- See Also:
ConnectionListener.onShutDown(ShutdownSignalException)
-
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
public void onFailed(Exception exception)
Description copied from interface:ConnectionListener
Called when a connection couldn't be established.- Specified by:
onFailed
in interfaceConnectionListener
- Parameters:
exception
- the exception thrown.
-
setDelegates
public void setDelegates(List<? extends ConnectionListener> delegates)
-
addDelegate
public void addDelegate(ConnectionListener delegate)
-
removeDelegate
public boolean removeDelegate(ConnectionListener delegate)
-
clearDelegates
public void clearDelegates()
-
-