|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teraspaces.qwfix.ordermanager.FIXOrder
com.teraspaces.qwfix.ordermanager.FIXCrossOrder
public final class FIXCrossOrder
Represents an order of a cross order. A FIXCrossOrder is a FIXOrder with a FIXOrderType as CROSS.
| Method Summary | |
|---|---|
void |
addOrderCancelRequest(FIXMessage cancelRequest)
Adds a pending cancel order message to the current order by sending it to the counter party. |
void |
addOrderReplaceRequest(FIXMessage replaceRequest)
Adds a pending replace order message to the current order by sending it to the counter party. |
FIXMessage |
createOrderCancelRequest()
Used by buy side application to create a Cross Order Cancel Request FIX message. |
FIXMessage |
createOrderReplaceRequest()
Used by buy side application to create a Cross Order Cancel/Replace Request FIX message. |
FIXMessage |
getCurrentOrder()
Gets the current order. |
FIXMessage |
getMessage(int index)
Gets the FIXMessage related to this order by specified index. |
int |
getMessageCount()
Gets the number of messages related to the current order. |
FIXMessage |
getPendingRequestMessage(int index)
Gets the pending request FIX message by index. |
int |
getPendingRequestsCount()
Gets count of pending request FIX messages. |
FIXMessage |
getRootOrder()
Gets the root order. |
FIXRegularOrder |
getSide1()
Gets the first side of current cross order. |
FIXRegularOrder |
getSide2()
Gets the second side of current cross order. |
boolean |
isActive()
Gets a value indicating whether the current order is active. |
boolean |
isPendingCancel()
Gets a value indicating whether the current order is pending cancel. |
boolean |
isPendingReplace()
Gets a value indicating whether the current order is pending replace |
| Methods inherited from class com.teraspaces.qwfix.ordermanager.FIXOrder |
|---|
getFIXOrderType, getIndex, getSessionOrderList, getSessionOrderManager, getSessionPersistence, getTag, isRestatedGT, setTag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void addOrderCancelRequest(FIXMessage cancelRequest)
The input cancelRequest message must be created by calling createOrderCancelRequest() on the same order.
This operation can only be performed on a buy side order and the system must be running in a normal production mode. Otherwise an RuntimeException will be thrown out.
If this operation returns successfully, the cancel request message is sent, and FIXSessionOrderManagerCommonListener.orderCancelRequestAdded(FIXOrder, FIXMessage, FIXEngineMessageHandlerStatus) event is triggered.
See FIXSessionOrderManagerSettings.alwaysSendCancelRequest() for more details about how a cancel message can be sent by order manager.
Before the message is sent, additional Visual Lambda modules and
FIXSessionOrderManagerBuySideListener.orderCancelRequestSending(FIXOrder, FIXMessage) event handlers
will be called. Application can hook up those handlers to provide further modification to the
message (add/delete/modify the fields). Application can also use the handlers to provide
further validation for the message. If the message failed the validation,
a FIXOrderManagerCancelRejectException will be thrown out and the message will not be sent.
cancelRequest - an "Cross Order Cancel Request" FIX message created by calling createOrderCancelRequest() on the same order.public void addOrderReplaceRequest(FIXMessage replaceRequest)
The input replaceRequest message must be created by calling createOrderCancelRequest() on the same order.
This operation can only be performed on a buy side order and the system must be running in a normal production mode. Otherwise an RuntimeException will be thrown out.
If this operation returns successfully, the replace request message is sent, and FIXSessionOrderManagerCommonListener.orderReplaceRequestAdded(FIXOrder, FIXMessage, FIXEngineMessageHandlerStatus) event is triggered.
See FIXSessionOrderManagerSettings.alwaysSendReplaceRequest() for more details about how a replace message can be sent by order manager.
Before the message is sent, additional Visual Lambda modules and
FIXSessionOrderManagerBuySideListener.orderReplaceRequestSending(FIXOrder, FIXMessage) event handlers
will be called. Application can hook up those handlers to provide further modification to the
message (add/delete/modify the fields). Application can also use the handlers to provide
further validation for the message. If the message failed the validation,
a FIXOrderManagerCancelRejectException will be thrown out and the message will not be sent.
replaceRequest - a "Cross Order Cancel/Replace Request" FIX message created by calling @link #createOrderReplaceRequest()} on the same orderpublic int getMessageCount()
FIXOrder
getMessageCount in class FIXOrderFIXOrder.getMessage(int)public FIXMessage createOrderCancelRequest()
FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderCancelRequest() will be used to copy tags.
Application still need to fill in some additional tags such as a new CrossID.
Application is responsible for generating the repeating group for each side of the cross order.
public FIXMessage createOrderReplaceRequest()
FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderReplaceRequest() will be used to copy tags.
Application still need to fill in some additional tags such as a new CrossID.
Application is responsible for generating the repeating group for each side of the cross order.
public boolean isActive()
FIXOrderA FIXRegularOrder is considered active if FIXRegularOrder.getOrdStatus() represents an active state.
A FIXCrossOrder is considered active if any side of the order is active.
A FIXListOrder is considered active if any individual order is active.
isActive in class FIXOrderpublic boolean isPendingCancel()
FIXOrderisPendingCancel() returns true if there is any cancel request in the pending order list.
An order may have more than 1 pending orders. It's up to the high level business logic to decide whether the pending orders should be processed in time order or reverse time order.
isPendingCancel in class FIXOrderFIXOrder.isPendingReplace(),
FIXOrder.getPendingRequestsCount(),
FIXOrder.getPendingRequestMessage(int)public boolean isPendingReplace()
FIXOrderisPendingReplace() returns true if there is any replace request in the pending order list.
An order may have more than 1 pending orders. It's up to the high level business logic to decide whether the pending orders should be processed in time order or reverse time order.
isPendingReplace in class FIXOrderFIXOrder.isPendingCancel(),
FIXOrder.getPendingRequestsCount(),
FIXOrder.getPendingRequestMessage(int)public FIXMessage getMessage(int index)
FIXOrder
getMessage in class FIXOrderindex - the index
FIXOrder.getMessageCount()public int getPendingRequestsCount()
FIXOrder
getPendingRequestsCount in class FIXOrderFIXOrder.getPendingRequestMessage(int)public FIXMessage getPendingRequestMessage(int index)
FIXOrderGetPendingRequestMessage does not acquire FIXOrderManager.syncRoot lock.
If the pending order is a cross order cancel or cross order replace request, the return message may contain more one side of the cross order. To get the exact side related to the current order, use FIXRegularOrder.getPendingRequest(int).
getPendingRequestMessage in class FIXOrderindex - the index
FIXOrder.getPendingRequestsCount()public FIXRegularOrder getSide1()
The cross order will be automatically populated into one or two FIXRegularOrder
(depending on the type of cross order). Each FIXRegular represents one side defined in the
cross order. The populated side order will have an FIXOrderType of CROSS_POPULATED.
public FIXRegularOrder getSide2()
The cross order will be automatically populated into one or two FIXRegularOrder
(depending on the type of cross order). Each FIXRegular represents one side defined in the
cross order. The populated side order will have an FIXOrderType of CROSS_POPULATED.
public FIXMessage getCurrentOrder()
public FIXMessage getRootOrder()
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||