Interface BaseConnectionLifeCycleListener<ProtocolClass>
-
- All Known Subinterfaces:
ClientConnectionLifeCycleListener,ConnectionLifeCycleListener
public interface BaseConnectionLifeCycleListener<ProtocolClass>A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnectionCreated(org.apache.activemq.artemis.core.server.ActiveMQComponent component, Connection connection, ProtocolClass protocol)This method is used both by client connector creation and server connection creation through acceptors.voidconnectionDestroyed(Object connectionID)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 Detail
-
connectionCreated
void connectionCreated(org.apache.activemq.artemis.core.server.ActiveMQComponent component, Connection connection, ProtocolClass protocol)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
void connectionDestroyed(Object connectionID)
Called when a connection is destroyed.- Parameters:
connectionID- the connection being destroyed.
-
connectionException
void connectionException(Object connectionID, ActiveMQException me)
Called when an error occurs on the connection.- Parameters:
connectionID- the id of the connection.me- the exception.
-
connectionReadyForWrites
void connectionReadyForWrites(Object connectionID, boolean ready)
-
-