Interface ConnectionListener


  • public interface ConnectionListener
    A 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 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 an InboundHandler, and should do his set up work. If the connection should not connect, for any reason, it should throw a ConnectionVetoException which in turn closes the connection (without calling the disconnected() 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.