|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectau.com.terabit.jproactor.IOOperation
public abstract class IOOperation
The IOOperation class defines commonality shared between all IO
operations in the JavaProactor.
When operation can be executed in non-blocking manner TCPAsynchChannel
calls IOoperation#execute() method to do IO operation. Once operation
is executed multiplexor might query ask whether this operation is completed
so the next operation, IOOperation#nextPossible(), if any, will be
executed while TCPAsynchChannel is active for the channel.
$Revision$ $Date$| Field Summary | |
|---|---|
protected AsynchChannel |
m_asynchChannel
Operations' m_asynchChannel once operation is completed. |
protected java.lang.Exception |
m_errorCause
Operations' error cause, if any |
| Constructor Summary | |
|---|---|
protected |
IOOperation(int type,
AsynchChannel handler)
Creates IOOperation instance. |
| Method Summary | |
|---|---|
protected abstract boolean |
execute()
|
AsynchChannel |
getChannel()
Returns AsycnhChannel of this operation. |
java.lang.Exception |
getError()
Returns last error during IO operation |
int |
getState()
Returns operation's m_state |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Exception m_errorCause
protected AsynchChannel m_asynchChannel
| Constructor Detail |
|---|
protected IOOperation(int type,
AsynchChannel handler)
m_type - IO operation m_type, where m_type is one of the following:
OP_ACCEPT, OP_READ, OP_WRITE or
OP_CONNECTm_asynchChannel - TCPAsynchChannel instance| Method Detail |
|---|
protected abstract boolean execute()
public AsynchChannel getChannel()
AsycnhChannel of this operation.
SelectableChannelinstance associated with this
operationTCPAsynchChannel#getChannel()public int getState()
STATE_FREE,
STATE_QUEUED, STATE_STARTED, STATE_FINISHED
or STATE_CANCELEDpublic java.lang.Exception getError()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||