org.otfeed.protocol.request
Class OptionChainWithSnapshotRequest

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

public class OptionChainWithSnapshotRequest
extends AbstractStreamWithSnapshotRequest
implements IRequest

Synthetic request: issues OptionChainSnapshotRequest, followed by OptionChainRequest.


Constructor Summary
OptionChainWithSnapshotRequest(IConnection connection, java.lang.String exchangeCode, java.lang.String symbolCode, MonthAndYear monthAndYear, PriceRange priceRange, 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

OptionChainWithSnapshotRequest

public OptionChainWithSnapshotRequest(IConnection connection,
                                      java.lang.String exchangeCode,
                                      java.lang.String symbolCode,
                                      MonthAndYear monthAndYear,
                                      PriceRange priceRange,
                                      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.