|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teraspaces.qwfix.FIXApplication
com.teraspaces.qwfix.FIXHistoricalApplication
public final class FIXHistoricalApplication
Provides methods and properties to manage a historical QWFIX application, such as methods to initialize a historical FIX engine and method to "replay" the historical FIX message communications. This class cannot be inherited.
| Constructor Summary | |
|---|---|
FIXHistoricalApplication(com.teraspaces.qwfix.repository.FIXRepository repository)
|
|
FIXHistoricalApplication(com.teraspaces.qwframework.io.SecureUri repositoryUri)
|
|
FIXHistoricalApplication(String repositoryUriString,
String repositoryLoginName,
String repositoryLoginPassword)
|
|
| Method Summary | |
|---|---|
FIXEngine |
addFIXEngine(String persistenceName,
String logDir)
Adds a FIX engine to the system. |
void |
close()
|
void |
replay(FIXEngine engine)
Replays the business logics by passing the application messages in MessageLog (see FIXEngine.getMessageLog()) to
registered message handlers. |
| Methods inherited from class com.teraspaces.qwfix.FIXApplication |
|---|
getEngineSettingsLoader, getRepositoryUri, getSchedulerLoader, getSchemaLoader, getSessionSettingsLoader, getVisualLambdaLoader |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FIXHistoricalApplication(com.teraspaces.qwfix.repository.FIXRepository repository)
public FIXHistoricalApplication(com.teraspaces.qwframework.io.SecureUri repositoryUri)
public FIXHistoricalApplication(String repositoryUriString,
String repositoryLoginName,
String repositoryLoginPassword)
| Method Detail |
|---|
public FIXEngine addFIXEngine(String persistenceName,
String logDir)
throws IOException
The persistenceName should be the file name in the result set of "dir *.StateInfo" in the logDir, trimming off the ".stateinfo" extension.
For example, if "20081130.Engine.Tutorial_OrderMan_Client" is a valid name, the file "20081130.Engine.Tutorial_OrderMan_Client.StateInfo" should exist in the log directory.
The above persistence name indicates that the name of the engine is "Tutorial_OrderMan_Client". The engine was started on day of "20081130" (local time, depending on the time zone of the scheduler). If multiple sessions per day is allowed by the scheduler, the persistence may have name of "20081130.Engine.Tutorial_OrderMan_Client", "20081130.Engine.Tutorial_OrderMan_Client_1", "20081130.Engine.Tutorial_OrderMan_Client_2", etc.
If this method returns successfully, the FIX engine has been successfully initialized. Application should make calls to FIXEngine.setEngineMessageHandler(FIXSession, FIXEngineMessageHandler, String...) or
FIXEngine.setEngineMessageDefaultHandler(FIXSession, FIXEngineMessageHandler) to register appropriate message handlers.
replay(FIXEngine) should be called after the message handlers are registered.
If the intraday log file is big, this method takes a while to load the index files.
persistenceName - the FIX engine persistence namelogDir - the log directory
IOException - Signals that an I/O exception has occurred.public void replay(FIXEngine engine)
FIXEngine.getMessageLog()) to
registered message handlers.
engine - the FIX engine returned from addFIXEngine(String, String)public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||