|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.otfeed.protocol.request.AbstractRequest
public abstract class AbstractRequest
Common base for all OpenTick requests.
| Nested Class Summary | |
|---|---|
static class |
AbstractRequest.JobStatus
Request status. |
| Method Summary | |
|---|---|
void |
fireCompleted(OTError error)
Internal method: used to wake up threads sleeping in waitForCompletion(). |
CommandEnum |
getCommand()
Returns command type of this request. |
OTError |
getError()
|
int |
getRequestId()
Returns request id number. |
AbstractRequest.JobStatus |
handleMessage(Header header,
java.nio.ByteBuffer in)
Abstract method to handle response message. |
boolean |
isCompleted()
|
java.lang.String |
toString()
|
void |
waitForCompletion()
Convenience method: blocks calling thread until request finishes. |
boolean |
waitForCompletion(long millis)
Convenience method: blocks calling thread until request finishes, or the specified number of milliseconds elapses. |
void |
writeRequest(java.nio.ByteBuffer out)
Abstract method that writes out request body. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public final CommandEnum getCommand()
public final int getRequestId()
public void writeRequest(java.nio.ByteBuffer out)
super.writeRequest
at the top of its method body.
out - output buffer.
public AbstractRequest.JobStatus handleMessage(Header header,
java.nio.ByteBuffer in)
header - parsed response header.in - input buffer with the rest of the
data (after header has been parsed).public java.lang.String toString()
toString in class java.lang.Objectpublic final OTError getError()
public final void fireCompleted(OTError error)
waitForCompletion().
public final boolean isCompleted()
public final boolean waitForCompletion(long millis)
millis - how long to wait for completion.public final void waitForCompletion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||