Package com.caplin.datasource.messaging
Enum Class MessageType
- All Implemented Interfaces:
Serializable
,Comparable<MessageType>
,Constable
This class defines all the types of Message types that are supported by DataSource.
The available Message types are:
- Record
- Record Type 2
- Record Type 3
- Page
- News
- Story
- Container
- Permission
- Generic Object
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
Gets the code that represents the Message's type.static MessageType
toMessageType
(int typeCode) Gets the MessageType that represents the specified code.toString()
static MessageType
Returns the enum constant of this class with the specified name.static MessageType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PAGE
-
RECORD
-
RECORD_TYPE2
-
RECORD_TYPE3
-
NEWS
-
STORY
-
CONTAINER
-
PERMISSION
-
JSON
-
UNKNOWN
-
GENERIC
-
LIBERATOR_INFO
-
PRICE_MASTER_OUTPUT_STATUS
-
UNDEFINED
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toMessageType
Gets the MessageType that represents the specified code.
The valid codes are:
- 221 -
PAGE
- 222 -
RECORD
- 223 -
NEWS
- 224 -
STORY
- 225 -
RECORD_TYPE2
- 226 -
RECORD_TYPE3
- 228 -
CONTAINER
- 230 -
PERMISSION
- 232 -
JSON
- 231 -
GENERIC
- 200 -
UNKNOWN
- -1 -
UNDEFINED
- Parameters:
typeCode
- The code used to describe a Message type.- Returns:
- The MessageType that corresponds to the specified code.
If the code does not match any of the available
MessageTypes, then
null
is returned.
- 221 -
-
getCode
public int getCode()Gets the code that represents the Message's type.
- Returns:
- The Message's code.
-
toString
- Overrides:
toString
in classEnum<MessageType>
-