## org.hornetq.spi.core.remoting
Interface ConnectionLifeCycleListener

    public interface ConnectionLifeCycleListener

A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events.

Author:
  Tim Fox

Method Summary
`void` `connectionCreated(Acceptor acceptor, 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)`

Method Detail

### connectionCreated

    void connectionCreated(Acceptor acceptor,
                           Connection connection,
                           ProtocolType protocol)

  This method is used both by client connector creation and server connection creation through acceptors. the acceptor will be set to null on client operations

  Parameters:
    `The` - acceptor here will be always null on a client connection created event.
    `connection` - the connection that has been created

### connectionDestroyed

    void connectionDestroyed(Object connectionID)

  called when a connection is destroyed.

  Parameters:
    `connectionID` - the connection being destroyed.

### connectionException

    void connectionException(Object connectionID,
                             HornetQException 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)

Copyright © 2009 Red Hat Inc. All Rights Reserved.