com.dukascopy.api
Enum IMessage.Reason

java.lang.Object
  extended by java.lang.Enum<IMessage.Reason>
      extended by com.dukascopy.api.IMessage.Reason
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IMessage.Reason>
Enclosing interface:
IMessage

public static enum IMessage.Reason
extends java.lang.Enum<IMessage.Reason>

Reason of message. Specific to IMessage.Type, except UNDEFINED.

See Also:
IMessage.getReasons()

Enum Constant Summary
ORDER_CHANGED_AMOUNT
          Order amount was changed.
ORDER_CHANGED_GTT
          Execution timeout (Good Till Time) was changed.
ORDER_CHANGED_LABEL
          Order label was changed.
ORDER_CHANGED_PRICE
          Order price was changed.
ORDER_CHANGED_SL
          Stop Loss trigger was changed.
ORDER_CHANGED_TYPE
          Order command was changed.
ORDER_CHANGED_TP
          Take Profit trigger was changed.
ORDER_CLOSED_BY_MERGE
          Order get merged.
ORDER_CLOSED_BY_SL
          Order closed by Stop Loss trigger.
ORDER_CLOSED_BY_TP
          Order closed by Take Profit trigger.
ORDER_FULLY_FILLED
          Order is Fully Filled.
UNDEFINED
           
 
Method Summary
 boolean isMessageTypeSupported(IMessage.Type messageType)
           
static IMessage.Reason valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static IMessage.Reason[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ORDER_CLOSED_BY_SL

public static final IMessage.Reason ORDER_CLOSED_BY_SL
Order closed by Stop Loss trigger. Specific to IMessage.Type.ORDER_CLOSE_OK message types.


ORDER_CLOSED_BY_TP

public static final IMessage.Reason ORDER_CLOSED_BY_TP
Order closed by Take Profit trigger. Specific to IMessage.Type.ORDER_CLOSE_OK message types.


ORDER_CLOSED_BY_MERGE

public static final IMessage.Reason ORDER_CLOSED_BY_MERGE
Order get merged. Specific to IMessage.Type.ORDER_CLOSE_OK message types.


ORDER_CHANGED_SL

public static final IMessage.Reason ORDER_CHANGED_SL
Stop Loss trigger was changed. Specific to IMessage.Type.ORDER_CHANGED_OK message types.


ORDER_CHANGED_TP

public static final IMessage.Reason ORDER_CHANGED_TP
Take Profit trigger was changed. Specific to IMessage.Type.ORDER_CHANGED_OK message types.


ORDER_CHANGED_AMOUNT

public static final IMessage.Reason ORDER_CHANGED_AMOUNT
Order amount was changed. Specific to IMessage.Type.ORDER_CHANGED_OK message types.


ORDER_CHANGED_PRICE

public static final IMessage.Reason ORDER_CHANGED_PRICE
Order price was changed. Specific to IMessage.Type.ORDER_CHANGED_OK message types.


ORDER_CHANGED_GTT

public static final IMessage.Reason ORDER_CHANGED_GTT
Execution timeout (Good Till Time) was changed. Specific to IMessage.Type.ORDER_CHANGED_OK message types.


ORDER_CHANGED_TYPE

public static final IMessage.Reason ORDER_CHANGED_TYPE
Order command was changed. Specific to IMessage.Type.ORDER_CHANGED_OK message types.


ORDER_FULLY_FILLED

public static final IMessage.Reason ORDER_FULLY_FILLED
Order is Fully Filled. Specific to IMessage.Type.ORDER_CHANGED_OK and IMessage.Type.ORDER_FILL_OK message types.


ORDER_CHANGED_LABEL

public static final IMessage.Reason ORDER_CHANGED_LABEL
Order label was changed. Specific to IMessage.Type.ORDER_CHANGED_OK message types.


UNDEFINED

public static final IMessage.Reason UNDEFINED
Method Detail

values

public static IMessage.Reason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IMessage.Reason c : IMessage.Reason.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IMessage.Reason valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isMessageTypeSupported

public boolean isMessageTypeSupported(IMessage.Type messageType)
Parameters:
messageType - IMessage.Type
Returns:
true if specified IMessage.Type can has this IMessage.Reason in IMessage.getReasons() set, false - otherwise