org.otfeed.protocol.connector
Class OTEngine

java.lang.Object
  extended by org.otfeed.protocol.connector.OTEngine
All Implemented Interfaces:
IConnection

public class OTEngine
extends java.lang.Object
implements IConnection


Constructor Summary
OTEngine(ISessionStreamerFactory factory, IBufferAllocator allocator, long heartbeatMillis, IConnectionStateListener listener)
           
 
Method Summary
 boolean isFinished()
           
 IRequest prepareRequest(ICommand command)
          Prepares a request.
 void runInEventThread(java.lang.Runnable runnable)
           
 void shutdown()
           
 void waitForCompletion()
           
 boolean waitForCompletion(long millis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.otfeed.IConnection
runInEventThread, shutdown, waitForCompletion, waitForCompletion
 

Constructor Detail

OTEngine

public OTEngine(ISessionStreamerFactory factory,
                IBufferAllocator allocator,
                long heartbeatMillis,
                IConnectionStateListener listener)
Method Detail

prepareRequest

public IRequest prepareRequest(ICommand command)
Description copied from interface: IConnection
Prepares a request. This is the main functionality of IConnection interface. It allowas caller to prepare a request to the OpenTick server.

Command parameter must be one of the known request commands, see org.otfeed.command package. See also: IRequest.

Specified by:
prepareRequest in interface IConnection
Parameters:
command - object describing request parameters.
Returns:
IRequest handle.

shutdown

public void shutdown()

isFinished

public boolean isFinished()

waitForCompletion

public void waitForCompletion()

waitForCompletion

public boolean waitForCompletion(long millis)

runInEventThread

public void runInEventThread(java.lang.Runnable runnable)


Copyright © 2007 Mike Kroutikov. All Rights Reserved.