|
|||||||||||
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)
InputAsynchChannel
ChannelConsumer
that the protcol will use to deliver packets
comming 'up' the channel.
setAsynchChannelListener
in interface InputAsynchChannel
public AsynchChannelListener getAsynchChannelListener()
getAsynchChannelListener
in interface InputAsynchChannel
public java.lang.Object narrow(java.lang.Class target)
Channel
narrow
in interface Channel
public void dispose()
Disposable
dispose
in interface Disposable
public void start() throws java.io.IOException
Service
start
in interface Service
java.io.IOException
public void stop(long timeout) throws java.io.IOException
Service
stop
in interface Service
timeout
- 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 OutputChannel
packet
-
java.io.IOException
public void flush() throws java.io.IOException
OutputChannel
flush
in interface OutputChannel
java.io.IOException
public void futureCompleted(com.ibm.io.async.IAbstractAsyncFuture abstractFuture, java.lang.Object attribute)
futureCompleted
in interface com.ibm.io.async.ICompletionListener
public java.net.InetAddress getInetAddress()
getInetAddress
in interface SocketMetadata
public boolean getKeepAlive() throws java.net.SocketException
getKeepAlive
in interface SocketMetadata
java.net.SocketException
public java.net.InetAddress getLocalAddress()
getLocalAddress
in interface SocketMetadata
public int getLocalPort()
getLocalPort
in interface SocketMetadata
public java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress
in interface SocketMetadata
public boolean getOOBInline() throws java.net.SocketException
getOOBInline
in interface SocketMetadata
java.net.SocketException
public int getPort()
getPort
in interface SocketMetadata
public int getReceiveBufferSize() throws java.net.SocketException
getReceiveBufferSize
in interface SocketMetadata
java.net.SocketException
public java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress
in interface SocketMetadata
public boolean getReuseAddress() throws java.net.SocketException
getReuseAddress
in interface SocketMetadata
java.net.SocketException
public int getSendBufferSize() throws java.net.SocketException
getSendBufferSize
in interface SocketMetadata
java.net.SocketException
public int getSoLinger() throws java.net.SocketException
getSoLinger
in interface SocketMetadata
java.net.SocketException
public int getSoTimeout() throws java.net.SocketException
getSoTimeout
in interface SocketMetadata
java.net.SocketException
public boolean getTcpNoDelay() throws java.net.SocketException
getTcpNoDelay
in interface SocketMetadata
java.net.SocketException
public int getTrafficClass() throws java.net.SocketException
getTrafficClass
in interface SocketMetadata
java.net.SocketException
public boolean isBound()
isBound
in interface SocketMetadata
public boolean isClosed()
isClosed
in interface SocketMetadata
public boolean isConnected()
isConnected
in interface SocketMetadata
public void setKeepAlive(boolean on) throws java.net.SocketException
setKeepAlive
in interface SocketMetadata
java.net.SocketException
public void setOOBInline(boolean on) throws java.net.SocketException
setOOBInline
in interface SocketMetadata
java.net.SocketException
public void setReceiveBufferSize(int size) throws java.net.SocketException
setReceiveBufferSize
in interface SocketMetadata
java.net.SocketException
public void setReuseAddress(boolean on) throws java.net.SocketException
setReuseAddress
in interface SocketMetadata
java.net.SocketException
public void setSendBufferSize(int size) throws java.net.SocketException
setSendBufferSize
in interface SocketMetadata
java.net.SocketException
public void setSoLinger(boolean on, int linger) throws java.net.SocketException
setSoLinger
in interface SocketMetadata
java.net.SocketException
public void setTcpNoDelay(boolean on) throws java.net.SocketException
setTcpNoDelay
in interface SocketMetadata
java.net.SocketException
public void setTrafficClass(int tc) throws java.net.SocketException
setTrafficClass
in interface SocketMetadata
java.net.SocketException
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |