public interface ConnectionLifeCycleListener
Modifier and Type | Method and Description |
---|---|
void |
connectionCreated(HornetQComponent component,
Connection connection,
ProtocolType protocol)
This method is used both by client connector creation and server connection creation through
acceptors.
|
void |
connectionDestroyed(Object connectionID)
Called when a connection is destroyed.
|
void |
connectionException(Object connectionID,
HornetQException me)
Called when an error occurs on the connection.
|
void |
connectionReadyForWrites(Object connectionID,
boolean ready) |
void connectionCreated(HornetQComponent component, Connection connection, ProtocolType protocol)
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
hornetq-server and hornetq-client packages while avoiding to pull too much into hornetq-core.
The pivotal point keeping us from removing the method is ConnectorFactory
and the
usage of it.
component
- This will probably be an Acceptor
and only used on the server side.connection
- the connection that has been createdprotocol
- the messaging protocol type this connection usesvoid connectionDestroyed(Object connectionID)
connectionID
- the connection being destroyed.void connectionException(Object connectionID, HornetQException me)
connectionID
- the id of the connection.me
- the exception.void connectionReadyForWrites(Object connectionID, boolean ready)
Copyright © 2018 JBoss by Red Hat. All rights reserved.