|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teraspaces.qwfix.ordermanager.FIXOrderManager
public final class FIXOrderManager
Provides global methods for QWFIX Order Manager related operations. This class cannot be inherited.
| Field Summary | |
|---|---|
static Object |
syncRoot
The global synchronization object. |
| Constructor Summary | |
|---|---|
FIXOrderManager()
|
|
| Method Summary | |
|---|---|
static FIXOrderManagerSettings |
addFIXEngine(FIXEngine engine,
com.teraspaces.visuallambda.VisualLambdaModuleFactory visualLambdaLoader)
Initializes the order management support on a given FIXEngine. |
static void |
addListener(FIXOrderManagerListener listener)
|
static boolean |
enableRemoteManagementService(FIXStandaloneApplication application)
Enables the remote management service by registering the service to the application. |
static FIXSessionOrderList |
getSessionOrderList(FIXSessionPersistence sessionPersistence)
Gets the session order list. |
static FIXSessionOrderManager |
getSessionOrderManager(FIXMessage message)
Gets the FIXSessionOrderManager by the FIXSession of the input message. |
static FIXSessionOrderManager |
getSessionOrderManager(FIXSession session)
Gets the session order manager. |
static FIXSessionOrderManager |
getSessionOrderManager(FIXSessionPersistence sessionPersistence)
Gets the FIXSessionOrderManager by the FIXSession of the input session persistence. |
static boolean |
isOrderManagerSupported(FIXEngineSettings engineSettings,
com.teraspaces.visuallambda.VisualLambdaModuleFactory visualLambdaLoader)
Determines whether order manager is supported in the specified engine settings. |
static void |
removeFIXEngine(FIXEngine engine)
|
static void |
removeListener(FIXOrderManagerListener listener)
|
static void |
reset()
Remove all registered instances of FIXEngine and reset the order manager. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object syncRoot
The FIXOrderManager is designed to process FIX messages in order. While the underlying FIX engine may process FIX messages in different FIX sessions with different direction in parallel, the FIXOrdermanager will only process one FIX message at any given time.
The syncRoot is used to synchronize the message process globally. It is used in most of the public methods and properties in QWFIX Order Manager component.
Sometimes applications may need to acquire lock to syncRoot, too. For example, application may acquire lock before sending new order messages to prevent incoming execution messages from being processed before the send order methods return. Application may also need to acquire the lock before access multiple properties about an order order to make sure the order order is not updated during the process.
| Constructor Detail |
|---|
public FIXOrderManager()
| Method Detail |
|---|
public static FIXSessionOrderManager getSessionOrderManager(FIXMessage message)
FIXSessionOrderManager by the FIXSession of the input message.
message - the message
public static FIXSessionOrderManager getSessionOrderManager(FIXSessionPersistence sessionPersistence)
FIXSessionOrderManager by the FIXSession of the input session persistence.
sessionPersistence - the session persistence
public static FIXSessionOrderList getSessionOrderList(FIXSessionPersistence sessionPersistence)
sessionPersistence - the session persistence
public static FIXSessionOrderManager getSessionOrderManager(FIXSession session)
session - the session
public static boolean enableRemoteManagementService(FIXStandaloneApplication application)
This method returns false if the session management service is not enabled in application. User needs to enable it using the Enterprise Manager GUI tool.
This operation calls FIXStandaloneApplication.registerRemoteService(String, com.teraspaces.qwframework.communication.QWRemoteServiceActivator) to register the service.
application - the application
public static boolean isOrderManagerSupported(FIXEngineSettings engineSettings,
com.teraspaces.visuallambda.VisualLambdaModuleFactory visualLambdaLoader)
engineSettings - the engine settingsvisualLambdaLoader - the visual lambda loader
public static void reset()
This method should be called before FIXEngine.unloadAll()
public static FIXOrderManagerSettings addFIXEngine(FIXEngine engine,
com.teraspaces.visuallambda.VisualLambdaModuleFactory visualLambdaLoader)
FIXEngine.
The settings of the order manager is retrieved by calling to FIXEngineSettings.getBusinessLogicHandlerSettingsXml(String)
The visualLambdaLoader is used to load the visual lambda custom modules associated with the order manager.
This method registers session message handlers to the supported session using FIXEngine.setEngineMessageHandler(FIXSession, FIXEngineMessageHandler, String...), the order flow will be handled by the code in order manager.
engine - the enginevisualLambdaLoader - the visual lambda loader
public static void addListener(FIXOrderManagerListener listener)
public static void removeListener(FIXOrderManagerListener listener)
public static void removeFIXEngine(FIXEngine engine)
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||