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 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 the component parameter is normally passed as null.

      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 is ConnectorFactory and the usage of it.

      Parameters:
      component - This will probably be an Acceptor and only used on the server side.
      connection - the connection that has been created
      protocol - the messaging protocol type this connection uses
    • connectionDestroyed

      void connectionDestroyed(Object connectionID, boolean failed)
      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)