|
||||||||||
| 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.FIXListOrder
public final class FIXListOrder
Represents an order of a list order. A cross order is a FIXOrder with a FIXOrderType as LIST.
| Method Summary | |
|---|---|
void |
addListCancelRequest(FIXMessage cancelRequest)
Adds a pending cancel order message to the current order by sending it to the counter party. |
void |
addListExecute(FIXMessage executeMessage)
Notifies the counter party to execute the list order by sending the specified "List Execute" message. |
void |
addListStatus(FIXMessage[] reportMessages)
Adds the list status. |
void |
addListStatusRequest(FIXMessage statusReqMessage)
Adds a status request message to the current order by sending it to the counter party. |
FIXMessage |
createListCancelRequest()
Creates the "List Cancel Request" FIX message. |
FIXMessage |
createListExecute()
Creates the list execute. |
FIXMessage |
createListStatus(int listStatusType,
int listOrderStatus)
Creates the "List Status" FIX message. |
FIXMessage |
createListStatusRequest()
Creates the "List Status Request" FIX message. |
FIXMessage |
getListCancelRequestMessage()
Gets the "List Cancel Request" FIX message. |
FIXMessage |
getListExecuteMessage()
Gets the list execute message. |
String |
getListID()
Gets the ListID. |
int |
getListOrderStatus()
Gets the list order status. |
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. |
FIXRegularOrder |
getOrder(int index)
Gets the order by index. |
int |
getOrderCount()
Gets the count of orders. |
FIXMessage |
getPendingRequestMessage(int index)
Gets the pending request FIX message by index. |
int |
getPendingRequestsCount()
Gets count of pending request FIX messages. |
FIXRegularOrder |
getSingleOrder(String clOrdID)
Gets the instance of the single order defined in current list order with the specified "ClOrdID" . |
boolean |
isActive()
Gets a value indicating whether the current order is active. |
boolean |
isListCompleted()
Determines whether the entire list has been transmitted. |
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 |
void |
setListOrderStatus(int status)
Sets the list order status. |
| 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 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 int getMessageCount()
FIXOrder
getMessageCount in class FIXOrderFIXOrder.getMessage(int)public FIXMessage getMessage(int index)
FIXOrder
getMessage in class FIXOrderindex - the index
FIXOrder.getMessageCount()public void addListStatusRequest(FIXMessage statusReqMessage)
The input statusReqMessage message must be created by calling createListStatusRequest() on the same list 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 status request message is sent, and FIXSessionOrderManagerCommonListener.orderStatusRequestAdded(FIXOrder, FIXMessage, FIXEngineMessageHandlerStatus) event is triggered.
See FIXSessionOrderManagerSettings.alwaysSendStatusRequest() for more details about how a status request message can be sent by order manager.
statusReqMessage - a "List Status Request" FIX message created by calling createListStatusRequest() on the same order.public void addListCancelRequest(FIXMessage cancelRequest)
The input cancelRequest message must be created by calling createListCancelRequest() 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.
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 - a "List Cancel Request" FIX message created by calling CreateListCancelRequest()()() on the same orderpublic 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 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 int getPendingRequestsCount()
FIXOrder
getPendingRequestsCount in class FIXOrderFIXOrder.getPendingRequestMessage(int)public String getListID()
public int getListOrderStatus()
public void setListOrderStatus(int status)
status - the new list order statuspublic boolean isListCompleted()
In case fragmentation is used, the list of order will be transmitted across multiple "New Order - List" FIX messages. This method will test if the list has been completed by checking whether each individual orders can be extracted from all messages.
Currently implementation simply checks if there is any "null" in the order list.
public void addListStatus(FIXMessage[] reportMessages)
throws FIXSessionRejectException,
IOException
This method is called on a sell side session only.
If an exception is thrown out, no message in the report list will be sent to the recipient. In another word, this operation is transactional. Messages are sent in an "all-or-none" fashion.
reportMessages - The list of status report messages (probably segmented).
FIXSessionRejectException - the FIX session reject exception
IOException - Signals that an I/O exception has occurred.public void addListExecute(FIXMessage executeMessage)
This operation can only be performed on a buy side list order.
executeMessage - the "List Execute" FIX message.public FIXMessage createListExecute()
This method creates the "List Execute" message based on the version of the FIX schema and parameters of the original list order (such as ListID, BidID and ClientBidID).
public FIXMessage createListStatusRequest()
public FIXMessage createListCancelRequest()
public FIXMessage createListStatus(int listStatusType,
int listOrderStatus)
The method creates a "List Status" FIX message and add the following 4 fields to it: "ListStatusType", "ListOrderStatus", "ListID" and "TransactTime".
Values of "ListStatusType", "ListOrderStatus" and "TransactTime" will be ignored if the corresponding fields are not defined in the message (e.g. standard FIX 4.1 messages).
listStatusType - the value of "ListStatusType" fieldlistOrderStatus - the value of "ListOrderStatus" field
public FIXMessage getListExecuteMessage()
public FIXMessage getListCancelRequestMessage()
public int getOrderCount()
getOrder(int)public FIXRegularOrder getOrder(int index)
index - the index
getOrderCount()public FIXRegularOrder getSingleOrder(String clOrdID)
If the order is accepted by the sell side (order is not canceled or rejected and "ListExecute" message is sent and accepted), all single orders will be "populated", the order can be retrieved by making call to FIXSessionOrderList.getOrderByClOrdID(String).
However, before "ListExecute" is sent and accepted, the order will not be populated. getOrderByClOrdID(String) will not be able to retrieve the order from the system. Use this method to get the order by linearly searching the single order list of the current list order.
clOrdID - the "ClOrdID" that uniquely identifies the order
FIXRegularOrder that represents the single order; or null if the input ClOrdID is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||