org.otfeed.protocol.request
Class CancelRequest
java.lang.Object
org.otfeed.protocol.request.AbstractRequest
org.otfeed.protocol.request.AbstractSessionRequest
org.otfeed.protocol.request.CancelRequest
public final class CancelRequest
- extends AbstractSessionRequest
Represents a request to cancel an existing tick, book, option chain, or
historical data request.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CancelRequest
public CancelRequest(CommandEnum cancelCommand,
int requestId,
int targetRequestId,
ICompletionDelegate completionDelegate)
writeRequest
public void writeRequest(java.nio.ByteBuffer out)
- Description copied from class:
AbstractSessionRequest
- Writes out the request header and session string.
Subclasses must override this if needed, and their
implementation must call this method as the first operation.
- Overrides:
writeRequest
in class AbstractSessionRequest
- Parameters:
out
- output buffer.
handleError
public void handleError(OTError error)
getError
public final OTError getError()
fireCompleted
public final void fireCompleted(OTError error)
- Internal method: used to wake up threads sleeping
in
waitForCompletion()
.
isCompleted
public final boolean isCompleted()
waitForCompletion
public final boolean waitForCompletion(long millis)
- Convenience method: blocks calling thread until
request finishes, or the specified number of milliseconds elapses.
Note that if request was not submitted,
this method returns immediately with no error.
- Parameters:
millis
- how long to wait for completion.
waitForCompletion
public final void waitForCompletion()
- Convenience method: blocks calling thread until
request finishes. Note that if request was not submitted,
this method returns immediately with no error.
Copyright © 2007 Mike Kroutikov. All Rights Reserved.