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.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | SocketConnector.ExceptionHandler
An exception handler that is notified of all exceptions that occur during the (re)connection process. |
| Modifier and Type | Method and Description |
|---|---|
| public Socket | Returns: the connected socketRedeclares java. |
| public void | setExceptionHandler(SocketConnector.
the handler to set exceptionHandlerSets the connector's exception handler. |
| public void |
| call | back to summary |
|---|---|
| public Socket call() throws InterruptedException Redeclares java. Blocks the calling thread until a connection is successfully established.
| |
| setExceptionHandler | back to summary |
|---|---|
| public void setExceptionHandler(SocketConnector. Sets the connector's exception handler.
The handler must be set before the
| |
| setSocketFactory | back to summary |
|---|---|
| public void setSocketFactory(SocketFactory socketFactory) Sets the connector's socket factory. If no factory is configured that connector will use the platform's default factory.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| connectionFailed | back to summary |
|---|---|
| public void connectionFailed(SocketConnector connector, Exception ex) | |