|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SocketConnector
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.
| Nested Class Summary | |
|---|---|
static interface |
SocketConnector.ExceptionHandler
An exception handler that is notified of all exceptions that occur during the (re)connection process. |
| Method Summary | |
|---|---|
Socket |
call()
Blocks the calling thread until a connection is successfully established. |
void |
setExceptionHandler(SocketConnector.ExceptionHandler exceptionHandler)
Sets the connector's exception handler. |
void |
setSocketFactory(SocketFactory socketFactory)
Sets the connector's socket factory. |
| Method Detail |
|---|
Socket call()
throws InterruptedException
call in interface Callable<Socket>InterruptedExceptionvoid setExceptionHandler(SocketConnector.ExceptionHandler exceptionHandler)
The handler must be set before the call() method is invoked.
exceptionHandler - the handler to setvoid setSocketFactory(SocketFactory socketFactory)
If no factory is configured that connector will use the platform's default factory.
socketFactory - the factory to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||