Interface ConnectionListener


public interface ConnectionListener
Connection listener.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    connected(InetAddress remoteHost)
    This method is invoked when a new Socket is connected, prior to any protocol exchange.
  • Method Details

    • connected

      void connected(InetAddress remoteHost) throws IOException
      This method is invoked when a new Socket is connected, prior to any protocol exchange.

      One can use this interface to implement a simple Firewall to prevent connections from a given host just by throwing an exception.

      Parameters:
      remoteHost - The remote host connected.
      Throws:
      IOException