Interface SocketConnector

  • All Superinterfaces:
    All Known Implementing Classes:

    public interface SocketConnector
    extends Callable<Socket>
    A Runnable that (re)connects a socket.

    An implementation of this interface is responsible for repeatedly attempting to create a socket connection to a remote host.

    • Method Detail

      • setExceptionHandler

        void setExceptionHandler​(SocketConnector.ExceptionHandler exceptionHandler)
        Sets the connector's exception handler.

        The handler must be set before the call() method is invoked.

        exceptionHandler - the handler to set
      • setSocketFactory

        void setSocketFactory​(SocketFactory socketFactory)
        Sets the connector's socket factory.

        If no factory is configured that connector will use the platform's default factory.

        socketFactory - the factory to set