Package com.swiftmq.swiftlet.net.event
Interface ConnectionListener
-
public interface ConnectionListenerA ConnectionListener is registered at a meta data object. It will be called after a connection is established.- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnected(Connection connection)A connection has been connected.voiddisconnected(Connection connection)A connection has been disconnected.
-
-
-
Method Detail
-
connected
void connected(Connection connection) throws ConnectionVetoException
A connection has been connected. The listener should check Swiftlet specific requirements such as authorization, should register anInboundHandler, and should do his set up work. If the connection should not connect, for any reason, it should throw aConnectionVetoExceptionwhich in turn closes the connection (without calling thedisconnected()method.- Parameters:
connection- connection.- Throws:
ConnectionVetoException- if there is a veto.- See Also:
InboundHandler
-
disconnected
void disconnected(Connection connection)
A connection has been disconnected. Will be called from the connection manager before terminating the connection physically. The listener should do his clean up work here.- Parameters:
connection- connection.
-
-