public void init(String RepositoryServerUri, String RepositoryUser, String RepositoryPassword, String FixLogDirectory,
FIXStandaloneApplicationStartupMode StartupMode) {
// Create application by loading all settings from repository server (identified by Uri, userID and password).
FIXStandaloneApplication app = new FIXStandaloneApplication(RepositoryServerUri, RepositoryUser, RepositoryPassword);
// Hook up event handlers.
app.addListener(applicationListener);
// Only way to fine tune the system performance of the QWFIX trading system. QWFIX engine can
// cache over 3 million messages per gigabyte of memory.
// QWFIX should be running on a dedicated 64 bit system, the memory utilization should be very
// predictable in this way.
FIXEngine.initMessageCache(FIXEngineMessageCacheType.BY_MESSAGE_COUNT, 3000000);
// "FixLogDirectory" should point to a directory in local file system, which will be used to store all log files.
// "StartupMode" should be "RECOVER" for production system. "RESET" and "RECONFIG" should only be used in QA and
// testing environment.
app.run("Tutorial_OrderMan_Server", FIXEngineRole.PRIMARY, FixLogDirectory, StartupMode, false);
}
FIXStandaloneApplicationListener applicationListener = new FIXStandaloneApplicationListener() {
public void engineInitialized(FIXEngine engine) {
// TODO Auto-generated method stub
}
public void engineRecovered(FIXEngine engine) {
// TODO Auto-generated method stub
}
public void engineStarted(FIXEngine engine) {
// TODO Auto-generated method stub
}
public void engineStopped(FIXEngine engine) {
// TODO Auto-generated method stub
}
public void engineStopping(FIXEngine engine) {
// TODO Auto-generated method stub
}
public void fatalErrorOccurs(Exception e) {
// TODO Auto-generated method stub
}
};
|