Interface BaseConnectionLifeCycleListener<ProtocolClass>
- All Known Subinterfaces:
ClientConnectionLifeCycleListener
,ConnectionLifeCycleListener
,ServerConnectionLifeCycleListener
public interface BaseConnectionLifeCycleListener<ProtocolClass>
A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.void
connectionDestroyed
(Object connectionID, boolean failed) Called when a connection is destroyed.void
connectionException
(Object connectionID, ActiveMQException me) Called when an error occurs on the connection.void
connectionReadyForWrites
(Object connectionID, boolean ready)
-
Method Details
-
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 thecomponent
parameter is normally passed asnull
.Leaving this method here and adding a different one at
ServerConnectionLifeCycleListener
is 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 isConnectorFactory
and the usage of it.- Parameters:
component
- This will probably be anAcceptor
and 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
-