Interface BaseConnectionLifeCycleListener<ProtocolClass>
- All Known Subinterfaces:
ClientConnectionLifeCycleListener,ConnectionLifeCycleListener,ServerConnectionLifeCycleListener
- All Known Implementing Classes:
ClientSessionFactoryImpl,RemotingServiceImpl
public interface BaseConnectionLifeCycleListener<ProtocolClass>
A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconnectionCreated(ActiveMQComponent component, Connection connection, ProtocolClass protocol) This method is used both by client connector creation and server connection creation through acceptors.voidconnectionDestroyed(Object connectionID, boolean failed) Called when a connection is destroyed.voidconnectionException(Object connectionID, ActiveMQException me) Called when an error occurs on the connection.voidconnectionReadyForWrites(Object connectionID, boolean ready)
-
Method Details
-
connectionCreated
This method is used both by client connector creation and server connection creation through acceptors. On the client side thecomponentparameter is normally passed asnull.Leaving this method here and adding a different one at
ServerConnectionLifeCycleListeneris a compromise for a reasonable split between the activemq-server and activemq-client packages while avoiding to pull too much into activemq-core. The pivotal point keeping us from removing the method isConnectorFactoryand the usage of it.- Parameters:
component- This will probably be anAcceptorand only used on the server side.connection- the connection that has been createdprotocol- the messaging protocol type this connection uses
-
connectionDestroyed
Called when a connection is destroyed.- Parameters:
connectionID- the connection being destroyed.
-
connectionException
Called when an error occurs on the connection.- Parameters:
connectionID- the id of the connection.me- the exception.
-
connectionReadyForWrites
-