org.otfeed.protocol.request
Class TickStreamWithSnapshotRequest

java.lang.Object
  extended by org.otfeed.protocol.request.AbstractStreamWithSnapshotRequest
      extended by org.otfeed.protocol.request.TickStreamWithSnapshotRequest
All Implemented Interfaces:
IRequest

public class TickStreamWithSnapshotRequest
extends AbstractStreamWithSnapshotRequest
implements IRequest

Synthetic request: issues SnapshotRequest, followed by TickStreamExRequest.


Constructor Summary
TickStreamWithSnapshotRequest(IConnection connection, java.lang.String exchangeCode, java.lang.String symbolCode, VolumeStyleEnum volumeStyle, IDataDelegate<OTQuote> quoteDelegate, IDataDelegate<OTTrade> tradeDelegate, IDataDelegate<OTMMQuote> mmQuoteDelegate, IDataDelegate<OTBBO> bboDelegate, ICompletionDelegate completionDelegate)
           
 
Method Summary
 void fireCompleted(OTError error)
          Internal method: used to wake up threads sleeping in waitForCompletion().
 OTError getError()
           
 boolean isCompleted()
           
 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 org.otfeed.protocol.request.AbstractStreamWithSnapshotRequest
cancel, prepareRequest, submit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.otfeed.IRequest
cancel, getError, isCompleted, submit, waitForCompletion, waitForCompletion
 

Constructor Detail

TickStreamWithSnapshotRequest

public TickStreamWithSnapshotRequest(IConnection connection,
                                     java.lang.String exchangeCode,
                                     java.lang.String symbolCode,
                                     VolumeStyleEnum volumeStyle,
                                     IDataDelegate<OTQuote> quoteDelegate,
                                     IDataDelegate<OTTrade> tradeDelegate,
                                     IDataDelegate<OTMMQuote> mmQuoteDelegate,
                                     IDataDelegate<OTBBO> bboDelegate,
                                     ICompletionDelegate completionDelegate)
Method Detail

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.