|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectau.com.terabit.jproactor.IOOperation
au.com.terabit.jproactor.OpWrite
public class OpWrite
The write operation implementation.
$Revision$ $Date$| Field Summary | |
|---|---|
protected java.nio.ByteBuffer |
m_buffer
data buffer |
protected int |
m_bytesCompleted
The number of bytes processed by IO operation. |
protected boolean |
m_flgExactly
This flag denotes that data needs to be written until buffer is empty. |
| Fields inherited from class au.com.terabit.jproactor.IOOperation |
|---|
m_asynchChannel, m_errorCause |
| Method Summary | |
|---|---|
protected boolean |
execute()
|
java.nio.ByteBuffer |
getBuffer()
Returns operations' data buffer. |
int |
getBytesCompleted()
|
void |
onComplete()
Called when IO operation has completed - notifies protocol instance that write operation has completed. |
int |
remaining()
Tells the difference between a number of requested and processed bytes at present time. |
| Methods inherited from class au.com.terabit.jproactor.IOOperation |
|---|
getChannel, getError, getState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.nio.ByteBuffer m_buffer
protected int m_bytesCompleted
-1 if error occured or channel is closed
protected boolean m_flgExactly
java.nio.ByteBuffer#remaning()| Method Detail |
|---|
public int getBytesCompleted()
public java.nio.ByteBuffer getBuffer()
public int remaining()
Example 1: Requested to read n bytes, actually read was m, so bytesRemaining is n-m
Example 2: Requested to write n bytes, actually written was m, so bytesRemaining is n-m
java.nio.ByteBuffer#remaning()protected boolean execute()
execute in class IOOperationpublic void onComplete()
IOOperation.onComplete()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||