|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.petals.transport.platform.nio.selector.AbstractSocketChannelContext
public class AbstractSocketChannelContext
The socket channel context of an input socket. It contains following information:
| Field Summary | |
|---|---|
protected java.nio.ByteBuffer |
directBuffer
NIO Direct buffer containing available bytes of the pending IO. |
protected static int |
INTEGER_SIZE_BYTE
|
protected boolean |
isIOPending
State of the pending IO: true: the buffer contains bytes of a pending IO,
false: no byte are reading or writing.
It is set to true after to have read or written the
externalized message exchange header (its size). |
protected int |
msgExRemainingBytes
Remaining bytes to read/write of the externalized message exchange. |
protected java.nio.channels.SocketChannel |
socketChannel
The socket channel |
| Constructor Summary | |
|---|---|
AbstractSocketChannelContext(java.nio.channels.SocketChannel socketChannel,
int byteBufferCapacity)
Create a socket channel context. |
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int INTEGER_SIZE_BYTE
protected java.nio.ByteBuffer directBuffer
protected boolean isIOPending
true: the buffer contains bytes of a pending IO,false: no byte are reading or writing.true after to have read or written the
externalized message exchange header (its size). It is set to
false after to have read or written the externalized message
completely, and to have transmitted the data to an externalized message
exchange worker in case of read (to do deserialization and so on).
protected int msgExRemainingBytes
Remaining bytes to read/write of the externalized message exchange. It should be initialized with the size of the externalized message exchange size plus the header size.
Note: "Remaining bytes to write" must understand as "Remaining bytes to put in the NIO direct buffer" and not as "Remaining byts to write in the TCP socket"
protected final java.nio.channels.SocketChannel socketChannel
| Constructor Detail |
|---|
public AbstractSocketChannelContext(java.nio.channels.SocketChannel socketChannel,
int byteBufferCapacity)
socketChannel - byteBufferCapacity - Size of the direct buffer to use to read or write bytes.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||