SocketConnector.
| Modifier and Type | Class and Description |
|---|---|
| private static class | DefaultSocketConnector.ConsoleExceptionHandler
A default |
| Modifier and Type | Field and Description |
|---|---|
| private final InetAddress | |
| private final DelayStrategy | |
| private SocketConnector. | |
| private final int | |
| private SocketFactory |
| Access | Constructor and Description |
|---|---|
| public | DefaultSocketConnector(InetAddress
address of remote listener address, int port of remote listener port, long delay before initial connection attempt initialDelay, long delay after failed connection attempt retryDelay)Constructs a new connector. |
| public | DefaultSocketConnector(InetAddress
address of remote listener address, int port of remote listener port, DelayStrategy strategy for choosing the delay to impose before each
connection attempt delayStrategy)Constructs a new connector. |
| Modifier and Type | Method and Description |
|---|---|
| public Socket | call()
Implements ch. |
| private Socket | |
| public void | setExceptionHandler(SocketConnector.
the handler to set exceptionHandlerImplements ch. |
| public void | setSocketFactory(SocketFactory
the factory to set socketFactory)Implements ch. |
| private void |
| address | back to summary |
|---|---|
| private final InetAddress address | |
| delayStrategy | back to summary |
|---|---|
| private final DelayStrategy delayStrategy | |
| exceptionHandler | back to summary |
|---|---|
| private SocketConnector. | |
| port | back to summary |
|---|---|
| private final int port | |
| socketFactory | back to summary |
|---|---|
| private SocketFactory socketFactory | |
| DefaultSocketConnector | back to summary |
|---|---|
| public DefaultSocketConnector(InetAddress address, int port, long initialDelay, long retryDelay) Constructs a new connector.
| |
| DefaultSocketConnector | back to summary |
|---|---|
| public DefaultSocketConnector(InetAddress address, int port, DelayStrategy delayStrategy) Constructs a new connector.
| |
| call | back to summary |
|---|---|
| public Socket call() throws InterruptedException Implements ch. Loops until the desired connection is established and returns the resulting connector.
| |
| createSocket | back to summary |
|---|---|
| private Socket createSocket() | |
| setExceptionHandler | back to summary |
|---|---|
| public void setExceptionHandler(SocketConnector. Implements ch. Doc from ch. Sets the connector's exception handler.
The handler must be set before the
| |
| setSocketFactory | back to summary |
|---|---|
| public void setSocketFactory(SocketFactory socketFactory) Implements ch. Doc from ch. Sets the connector's socket factory. If no factory is configured that connector will use the platform's default factory.
| |
| useDefaultsForMissingFields | back to summary |
|---|---|
| private void useDefaultsForMissingFields() | |
ExceptionHandler that writes to System.out
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | connectionFailed(SocketConnector connector, Exception ex)
Implements ch. |
| ConsoleExceptionHandler | back to summary |
|---|---|
| private ConsoleExceptionHandler() | |
| connectionFailed | back to summary |
|---|---|
| public void connectionFailed(SocketConnector connector, Exception ex) Implements ch. | |