org.otfeed.protocol.request
Class AbstractStreamWithSnapshotRequest

java.lang.Object
  extended by org.otfeed.protocol.request.AbstractStreamWithSnapshotRequest
Direct Known Subclasses:
OptionChainWithSnapshotRequest, TickStreamWithSnapshotRequest

public abstract class AbstractStreamWithSnapshotRequest
extends java.lang.Object

Base for synthetic requests: a snapshot request followed by a stream request.


Method Summary
 void cancel()
           
 void fireCompleted(OTError error)
          Internal method: used to wake up threads sleeping in waitForCompletion().
 OTError getError()
           
 boolean isCompleted()
           
 void prepareRequest()
           
 void submit()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

prepareRequest

public final void prepareRequest()

submit

public void submit()

cancel

public void cancel()

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.