|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activeio.net.AIOAsynchChannel
| Field Summary | |
protected static int |
DEFAULT_BUFFER_SIZE
|
| Fields inherited from interface org.activeio.Service |
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT |
| Constructor Summary | |
protected |
AIOAsynchChannel(com.ibm.io.async.AsyncSocketChannel socketChannel)
|
| Method Summary | |
void |
dispose()
This method should not throw any exceptions. |
void |
flush()
Some channels may buffer data which may be sent down if flush() is called. |
void |
futureCompleted(com.ibm.io.async.IAbstractAsyncFuture abstractFuture,
java.lang.Object attribute)
|
AsynchChannelListener |
getAsynchChannelListener()
|
java.net.InetAddress |
getInetAddress()
|
boolean |
getKeepAlive()
|
java.net.InetAddress |
getLocalAddress()
|
int |
getLocalPort()
|
java.net.SocketAddress |
getLocalSocketAddress()
|
boolean |
getOOBInline()
|
int |
getPort()
|
int |
getReceiveBufferSize()
|
java.net.SocketAddress |
getRemoteSocketAddress()
|
boolean |
getReuseAddress()
|
int |
getSendBufferSize()
|
int |
getSoLinger()
|
int |
getSoTimeout()
|
boolean |
getTcpNoDelay()
|
int |
getTrafficClass()
|
boolean |
isBound()
|
boolean |
isClosed()
|
boolean |
isConnected()
|
java.lang.Object |
narrow(java.lang.Class target)
Since a Channel may be composed from a chain of other Channel obejcts, this method allows you to query the chain for the specified interface. |
void |
setAsynchChannelListener(AsynchChannelListener channelListener)
Registers the ChannelConsumer that the protcol will use to deliver packets
comming 'up' the channel. |
void |
setKeepAlive(boolean on)
|
void |
setOOBInline(boolean on)
|
void |
setReceiveBufferSize(int size)
|
void |
setReuseAddress(boolean on)
|
void |
setSendBufferSize(int size)
|
void |
setSoLinger(boolean on,
int linger)
|
void |
setTcpNoDelay(boolean on)
|
void |
setTrafficClass(int tc)
|
void |
start()
Starts the channel. |
void |
stop(long timeout)
Stops the channel. |
java.lang.String |
toString()
|
void |
write(Packet packet)
Sends a packet down the channel towards the media. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final int DEFAULT_BUFFER_SIZE
| Constructor Detail |
protected AIOAsynchChannel(com.ibm.io.async.AsyncSocketChannel socketChannel)
throws java.io.IOException
| Method Detail |
public void setAsynchChannelListener(AsynchChannelListener channelListener)
InputAsynchChannelChannelConsumer that the protcol will use to deliver packets
comming 'up' the channel.
setAsynchChannelListener in interface InputAsynchChannelpublic AsynchChannelListener getAsynchChannelListener()
getAsynchChannelListener in interface InputAsynchChannelpublic java.lang.Object narrow(java.lang.Class target)
Channel
narrow in interface Channelpublic void dispose()
Disposable
dispose in interface Disposable
public void start()
throws java.io.IOException
Service
start in interface Servicejava.io.IOException
public void stop(long timeout)
throws java.io.IOException
Service
stop in interface Servicetimeout - The amount of time the channel is allowed to take to gracefully stop. If the timeout
is exceeded, the channel should do a forcefull stop.
java.io.IOException
public void write(Packet packet)
throws java.io.IOException
OutputChannel
write in interface OutputChannelpacket -
java.io.IOException
public void flush()
throws java.io.IOException
OutputChannel
flush in interface OutputChanneljava.io.IOException
public void futureCompleted(com.ibm.io.async.IAbstractAsyncFuture abstractFuture,
java.lang.Object attribute)
futureCompleted in interface com.ibm.io.async.ICompletionListenerpublic java.net.InetAddress getInetAddress()
getInetAddress in interface SocketMetadata
public boolean getKeepAlive()
throws java.net.SocketException
getKeepAlive in interface SocketMetadatajava.net.SocketExceptionpublic java.net.InetAddress getLocalAddress()
getLocalAddress in interface SocketMetadatapublic int getLocalPort()
getLocalPort in interface SocketMetadatapublic java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress in interface SocketMetadata
public boolean getOOBInline()
throws java.net.SocketException
getOOBInline in interface SocketMetadatajava.net.SocketExceptionpublic int getPort()
getPort in interface SocketMetadata
public int getReceiveBufferSize()
throws java.net.SocketException
getReceiveBufferSize in interface SocketMetadatajava.net.SocketExceptionpublic java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in interface SocketMetadata
public boolean getReuseAddress()
throws java.net.SocketException
getReuseAddress in interface SocketMetadatajava.net.SocketException
public int getSendBufferSize()
throws java.net.SocketException
getSendBufferSize in interface SocketMetadatajava.net.SocketException
public int getSoLinger()
throws java.net.SocketException
getSoLinger in interface SocketMetadatajava.net.SocketException
public int getSoTimeout()
throws java.net.SocketException
getSoTimeout in interface SocketMetadatajava.net.SocketException
public boolean getTcpNoDelay()
throws java.net.SocketException
getTcpNoDelay in interface SocketMetadatajava.net.SocketException
public int getTrafficClass()
throws java.net.SocketException
getTrafficClass in interface SocketMetadatajava.net.SocketExceptionpublic boolean isBound()
isBound in interface SocketMetadatapublic boolean isClosed()
isClosed in interface SocketMetadatapublic boolean isConnected()
isConnected in interface SocketMetadata
public void setKeepAlive(boolean on)
throws java.net.SocketException
setKeepAlive in interface SocketMetadatajava.net.SocketException
public void setOOBInline(boolean on)
throws java.net.SocketException
setOOBInline in interface SocketMetadatajava.net.SocketException
public void setReceiveBufferSize(int size)
throws java.net.SocketException
setReceiveBufferSize in interface SocketMetadatajava.net.SocketException
public void setReuseAddress(boolean on)
throws java.net.SocketException
setReuseAddress in interface SocketMetadatajava.net.SocketException
public void setSendBufferSize(int size)
throws java.net.SocketException
setSendBufferSize in interface SocketMetadatajava.net.SocketException
public void setSoLinger(boolean on,
int linger)
throws java.net.SocketException
setSoLinger in interface SocketMetadatajava.net.SocketException
public void setTcpNoDelay(boolean on)
throws java.net.SocketException
setTcpNoDelay in interface SocketMetadatajava.net.SocketException
public void setTrafficClass(int tc)
throws java.net.SocketException
setTrafficClass in interface SocketMetadatajava.net.SocketExceptionpublic java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||