public class SocketIODelegate extends java.lang.Object implements DriverIODelegate
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SO_TIMEOUT |
static int |
DEFAULT_TIMEOUT |
| Constructor and Description |
|---|
SocketIODelegate(AbstractIODelegatingDriver driver,
java.lang.String hostname,
int port) |
SocketIODelegate(AbstractIODelegatingDriver driver,
java.lang.String hostname,
int port,
int timeout,
int soTimeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connect to the underlying IO source.
|
void |
disconnect()
Disconnect from the underlying IO source.
|
void |
onNotifyConnectFailed(java.lang.Exception connectError)
AbstractDriver.notifyConnectFailed(Exception) was intercepted by AbstractIODelegatingDriver. |
void |
onNotifyConnectionLost()
AbstractDriver.notifyConnectionLost() was intercepted by AbstractIODelegatingDriver. |
void |
onNotifyConnectSucceeded()
AbstractDriver.notifyConnectSucceeded() was intercepted by AbstractIODelegatingDriver. |
void |
onNotifyDisconnectDone()
AbstractDriver.notifyDisconnectDone() was intercepted by AbstractIODelegatingDriver. |
void |
writeToIO(java.nio.ByteBuffer... buffers)
Write data to the underlying IO source.
|
public static final int DEFAULT_TIMEOUT
public static final int DEFAULT_SO_TIMEOUT
public SocketIODelegate(AbstractIODelegatingDriver driver, java.lang.String hostname, int port)
public SocketIODelegate(AbstractIODelegatingDriver driver, java.lang.String hostname, int port, int timeout, int soTimeout)
public void connect()
throws java.io.IOException
DriverIODelegateconnect in interface DriverIODelegatejava.io.IOException - Any IOException thrown during connect will result in a call to AbstractDriver.notifyConnectFailed(Exception) and the rest of the connection sequence will
be aborted. Implementations do not need to make this call themselves.public void disconnect()
DriverIODelegatedisconnect in interface DriverIODelegatepublic void writeToIO(java.nio.ByteBuffer... buffers)
DriverIODelegatewriteToIO in interface DriverIODelegatebuffers - Data to write.public void onNotifyConnectSucceeded()
DriverIODelegateAbstractDriver.notifyConnectSucceeded() was intercepted by AbstractIODelegatingDriver.onNotifyConnectSucceeded in interface DriverIODelegatepublic void onNotifyConnectFailed(java.lang.Exception connectError)
DriverIODelegateAbstractDriver.notifyConnectFailed(Exception) was intercepted by AbstractIODelegatingDriver.onNotifyConnectFailed in interface DriverIODelegateconnectError - The error associated with the connect failure.public void onNotifyConnectionLost()
DriverIODelegateAbstractDriver.notifyConnectionLost() was intercepted by AbstractIODelegatingDriver.onNotifyConnectionLost in interface DriverIODelegatepublic void onNotifyDisconnectDone()
DriverIODelegateAbstractDriver.notifyDisconnectDone() was intercepted by AbstractIODelegatingDriver.onNotifyDisconnectDone in interface DriverIODelegate