T
- A class that extends MotifTrade
, which this RejectEvent relates to. For
example, ESPTrade
or BlockTrade
.public class RejectEvent<T extends MotifTrade> extends ResponderEvent<T>
An event that denotes that the trade has been rejected. Reject events are expected to contain an error code and/or an error message to indicate why the trade was rejected. An error code is generally more useful than a message, because it can be internationalised on the front end into a helpful error message in the user's own language.
Note that some error codes or messages are provided by the trading system if your adapter submitted the trade and it failed. But you may reject the trade from your adapter code without ever submitting it to the trading system, if for example you detect that the fields on the incoming trade message are invalid. In this situation you will need to provide your own error code and/or message.
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_CODE
The field name used for sending the error code to the front end.
|
static String |
ERROR_MESSAGE
The field name used for sending the error message to the front end.
|
static String |
REJECT
The event name for a Reject event
|
fields
Constructor and Description |
---|
RejectEvent(String errorMessage,
String errorCode)
Constructs a RejectEvent with the event name "Reject" and the specified error message and code.
|
public static final String REJECT
public static final String ERROR_CODE
public static final String ERROR_MESSAGE
public RejectEvent(String errorMessage, String errorCode)
errorMessage
- A natural language message that can be displayed to the user giving more information
about the rejection. This sometimes comes directly from the trading system. However it is often less useful
than the error code, because it will be written in a specific language.errorCode
- The reject code that can be displayed to the user. This can be translated to an internationalised
error message rather than shown as a raw error code, to give the user useful feedback regardless of their language.Copyright © 2015 Caplin Systems.