public class ChannelManagerImpl extends java.lang.Object implements ChannelManager
| Constructor and Description |
|---|
ChannelManagerImpl(ChannelAddress inAddr,
java.nio.channels.ByteChannel inChannel,
ChannelProtocol inProtocol) |
| Modifier and Type | Method and Description |
|---|---|
void |
finishClose(java.lang.Object inTaskFinished)
Called by tasks to indicate that they have finished reading and writing.
|
void |
finishConnect(ChannelAddress inAddr,
ChannelProtocol inProtocol)
Finish the connection process by updating the address and protocol.
|
ChannelAddress |
getAddress() |
java.nio.channels.ByteChannel |
getChannel() |
ChannelProtocol |
getProtocol() |
boolean |
isReadable() |
boolean |
isWritable() |
void |
kill()
Kill the channel to test recovery features.
|
void |
requestClose()
Stop reader and writer tasks and close the channel.
|
java.lang.String |
toString() |
void |
wakeup()
Wake up reader and writer tasks.
|
public ChannelManagerImpl(ChannelAddress inAddr, java.nio.channels.ByteChannel inChannel, ChannelProtocol inProtocol)
public boolean isReadable()
isReadable in interface ChannelManagerpublic boolean isWritable()
isWritable in interface ChannelManagerpublic ChannelAddress getAddress()
getAddress in interface ChannelManagerpublic java.nio.channels.ByteChannel getChannel()
getChannel in interface ChannelManagerpublic ChannelProtocol getProtocol()
getProtocol in interface ChannelManagerpublic void finishConnect(ChannelAddress inAddr, ChannelProtocol inProtocol) throws ConnectException
ChannelManagerfinishConnect in interface ChannelManagerinAddr - - The remote address.inProtocol - - The protocol for this address.ConnectExceptionpublic void wakeup()
throws ConnectException
ChannelManagerwakeup in interface ChannelManagerConnectExceptionpublic void requestClose()
ChannelManagerrequestClose in interface ChannelManagerpublic void finishClose(java.lang.Object inTaskFinished)
ChannelManagerfinishClose in interface ChannelManagerinTaskFinished - - The task that has finished and is closed.public void kill()
public java.lang.String toString()
toString in class java.lang.Object