com.devexperts.qd.qtp
Enum MessageType

java.lang.Object
  extended by java.lang.Enum<MessageType>
      extended by com.devexperts.qd.qtp.MessageType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MessageType>

public enum MessageType
extends java.lang.Enum<MessageType>

Type of QTP message.

See Also:
MessageConstants

Nested Class Summary
static class MessageType.Flag
           
 
Enum Constant Summary
DESCRIBE_PROTOCOL
           
DESCRIBE_RECORDS
           
DESCRIBE_RESERVED
           
HEARTBEAT
           
HISTORY_ADD_SUBSCRIPTION
           
HISTORY_DATA
           
HISTORY_REMOVE_SUBSCRIPTION
           
PART
           
RAW_DATA
           
RMI_CANCEL
           
RMI_DESCRIBE_OPERATION
           
RMI_DESCRIBE_SUBJECT
           
RMI_ERROR
           
RMI_REQUEST
           
RMI_RESULT
           
STREAM_ADD_SUBSCRIPTION
           
STREAM_DATA
           
STREAM_REMOVE_SUBSCRIPTION
           
TEXT_FORMAT_SPECIAL
           
TICKER_ADD_SUBSCRIPTION
           
TICKER_DATA
           
TICKER_REMOVE_SUBSCRIPTION
           
 
Method Summary
static MessageType findById(int id)
          Returns message type with a given id or null if the message type is not known.
static MessageType findByName(java.lang.String name)
           
static MessageType forAddSubscription(QDContract contract)
           
static MessageType forData(QDContract contract)
           
static MessageType forRemoveSubscription(QDContract contract)
           
 QDContract getContract()
           
 java.util.Collection<MessageType.Flag> getFlags()
           
 int getId()
          Returns message identified in QTP protocol.
 boolean isData()
           
 boolean isHistory()
           
 boolean isRMI()
           
 boolean isStream()
           
 boolean isSubscription()
           
 boolean isSubscriptionAdd()
           
 boolean isSubscriptionRemove()
           
static MessageType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MessageType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HEARTBEAT

public static final MessageType HEARTBEAT

DESCRIBE_PROTOCOL

public static final MessageType DESCRIBE_PROTOCOL

DESCRIBE_RECORDS

public static final MessageType DESCRIBE_RECORDS

DESCRIBE_RESERVED

public static final MessageType DESCRIBE_RESERVED

PART

public static final MessageType PART

RAW_DATA

public static final MessageType RAW_DATA

TICKER_DATA

public static final MessageType TICKER_DATA

TICKER_ADD_SUBSCRIPTION

public static final MessageType TICKER_ADD_SUBSCRIPTION

TICKER_REMOVE_SUBSCRIPTION

public static final MessageType TICKER_REMOVE_SUBSCRIPTION

STREAM_DATA

public static final MessageType STREAM_DATA

STREAM_ADD_SUBSCRIPTION

public static final MessageType STREAM_ADD_SUBSCRIPTION

STREAM_REMOVE_SUBSCRIPTION

public static final MessageType STREAM_REMOVE_SUBSCRIPTION

HISTORY_DATA

public static final MessageType HISTORY_DATA

HISTORY_ADD_SUBSCRIPTION

public static final MessageType HISTORY_ADD_SUBSCRIPTION

HISTORY_REMOVE_SUBSCRIPTION

public static final MessageType HISTORY_REMOVE_SUBSCRIPTION

RMI_DESCRIBE_SUBJECT

public static final MessageType RMI_DESCRIBE_SUBJECT

RMI_DESCRIBE_OPERATION

public static final MessageType RMI_DESCRIBE_OPERATION

RMI_REQUEST

public static final MessageType RMI_REQUEST

RMI_CANCEL

public static final MessageType RMI_CANCEL

RMI_RESULT

public static final MessageType RMI_RESULT

RMI_ERROR

public static final MessageType RMI_ERROR

TEXT_FORMAT_SPECIAL

public static final MessageType TEXT_FORMAT_SPECIAL
Method Detail

values

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

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

valueOf

public static MessageType 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

getFlags

public java.util.Collection<MessageType.Flag> getFlags()

getId

public int getId()
Returns message identified in QTP protocol.


isData

public boolean isData()

isSubscription

public boolean isSubscription()

isSubscriptionAdd

public boolean isSubscriptionAdd()

isSubscriptionRemove

public boolean isSubscriptionRemove()

isStream

public boolean isStream()

isHistory

public boolean isHistory()

isRMI

public boolean isRMI()

getContract

public QDContract getContract()

findById

public static MessageType findById(int id)
Returns message type with a given id or null if the message type is not known.


findByName

public static MessageType findByName(java.lang.String name)

forData

public static MessageType forData(QDContract contract)

forAddSubscription

public static MessageType forAddSubscription(QDContract contract)

forRemoveSubscription

public static MessageType forRemoveSubscription(QDContract contract)