|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teraspaces.qwfix.FIXApplication
com.teraspaces.qwfix.FIXStandaloneApplication
public final class FIXStandaloneApplication
Provides methods and properties to manage a standlone application, such as methods to start and stop an application and properties to get information about a stand alone application. This class cannot be inherited.
The FIXStandaloneApplication is the most commonly used application framework. A stand alone application manages only one FIX engine. Its life cycle is controller by the scheduler of the FIX engine.
| Constructor Summary | |
|---|---|
FIXStandaloneApplication(com.teraspaces.qwfix.repository.FIXRepository repository)
Instantiates a new fIX standalone application. |
|
FIXStandaloneApplication(com.teraspaces.qwframework.io.SecureUri repositoryUri)
Instantiates a new fIX standalone application. |
|
FIXStandaloneApplication(String repositoryUriString,
String repositoryLoginName,
String repositoryLoginPassword)
Instantiates a new fIX standalone application. |
|
| Method Summary | |
|---|---|
void |
addListener(FIXStandaloneApplicationListener listener)
Adds an event listener. |
void |
exit()
Turns off the scheduler and close the repository. |
FIXEngine |
getFIXEngine()
Gets the FIX engine. |
boolean |
isEngineSettingsUpdated(String engineName,
String fixLogDirectory)
Determines whether FIX engine settings has been updated. |
boolean |
isRecoveryRequired(String engineName,
String fixLogDirectory)
Determines whether recovery is required for the FIX engine specified. |
void |
registerRemoteService(String serviceName,
com.teraspaces.qwframework.communication.QWRemoteServiceActivator serviceActivator)
Registers the remote service. |
void |
removeListener(FIXStandaloneApplicationListener listener)
Removes an event listener. |
void |
run(String engineName,
FIXEngineRole role,
String fixLogDirectory,
FIXStandaloneApplicationStartupMode startupMode,
boolean syncIncomingMessages)
Starts the application. |
| 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 FIXStandaloneApplication(com.teraspaces.qwfix.repository.FIXRepository repository)
repository - the repositorypublic FIXStandaloneApplication(com.teraspaces.qwframework.io.SecureUri repositoryUri)
repositoryUri - the repository uri
public FIXStandaloneApplication(String repositoryUriString,
String repositoryLoginName,
String repositoryLoginPassword)
repositoryUriString - the repository uri stringrepositoryLoginName - the repository login namerepositoryLoginPassword - the repository login password| Method Detail |
|---|
public boolean isRecoveryRequired(String engineName,
String fixLogDirectory)
Recovery is required if the process is unexpectedly terminated and the FIX engine scheduler of the current engine has not expired as of the time this method is called.
This method should be called before run(String, FIXEngineRole, String, FIXStandaloneApplicationStartupMode, boolean)
is called. The main purpose of this method is to give user an option to determine
FIXStandaloneApplicationStartupMode parameter in run method; if recovery is required.
For example, if engineSettingsUpdated is true, RECOVER will keep using the old FIX
engine settings; while RECONFIG will take the latest settings and convert the message log to the
latest settings before starting the FIX engine (Note: Some restriction may apply about how the settings
can be modified in order to use RECONFIG).
engineName - the engine namefixLogDirectory - the FIX log directory
public boolean isEngineSettingsUpdated(String engineName,
String fixLogDirectory)
engineName - the engine namefixLogDirectory - the FIX log directory
public void run(String engineName,
FIXEngineRole role,
String fixLogDirectory,
FIXStandaloneApplicationStartupMode startupMode,
boolean syncIncomingMessages)
The application will try to load the settings for the FIXEngine by specified engineName.
If the process is started before the start time of the engine scheduler, the process will wait until the scheduler is kicked start at the start time. The engine may stay uninitialized for a long time. Accessing properties such as Settings from the uninitialized FIXEngine is meaningless, and should be treated as a bug in your application.
If processed is restarted in recovery mode, the version of the FIX engine settings will stay the same, even if the latest settings has been changed in the repository. Use Reset or RECONFIG to catch up the latest version change. See FIXStandaloneApplicationStartupMode for more details.
engineName - the engine namerole - the rolefixLogDirectory - the FIX log directorystartupMode - the start up mode that affects the handling of version of settingssyncIncomingMessages - If set to true the incoming messages will be processed by one thread; otherwise, each session will create a separate thread to process incoming FIX messages.public void exit()
This method does not actually terminate the process!
public FIXEngine getFIXEngine()
The FIX engine won't be available until FIXStandaloneApplicationListener.engineInitialized(FIXEngine) event is triggered.
public void addListener(FIXStandaloneApplicationListener listener)
The method is thread safe.
listener - the listenerpublic void removeListener(FIXStandaloneApplicationListener listener)
The method is thread safe.
listener - the listener
public void registerRemoteService(String serviceName,
com.teraspaces.qwframework.communication.QWRemoteServiceActivator serviceActivator)
serviceName - the service nameserviceActivator - the service activator
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||