Package de.otto.synapse.translator
Enum MessageFormat
java.lang.Object
java.lang.Enum<MessageFormat>
de.otto.synapse.translator.MessageFormat
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MessageFormat>,java.lang.constant.Constable
public enum MessageFormat extends java.lang.Enum<MessageFormat>
Identifies the format used to encode or decode messages.
-
Nested Class Summary
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSYNAPSE_MSG_COMPACTIONKEYstatic java.lang.StringSYNAPSE_MSG_FORMATstatic java.lang.StringSYNAPSE_MSG_HEADERSstatic java.lang.StringSYNAPSE_MSG_KEYstatic java.lang.StringSYNAPSE_MSG_PARTITIONKEYstatic java.lang.StringSYNAPSE_MSG_PAYLOAD -
Method Summary
Modifier and Type Method Description static MessageFormatdefaultMessageFormat()Returns the default message format used by Synapse to encode messages.static MessageFormatvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MessageFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.static MessageFormatversionOf(java.lang.String message)Determines theMessageFormatfrom the string representation of some message.
-
Enum Constant Details
-
Field Details
-
SYNAPSE_MSG_FORMAT
public static final java.lang.String SYNAPSE_MSG_FORMAT- See Also:
- Constant Field Values
-
SYNAPSE_MSG_KEY
public static final java.lang.String SYNAPSE_MSG_KEY- See Also:
- Constant Field Values
-
SYNAPSE_MSG_COMPACTIONKEY
public static final java.lang.String SYNAPSE_MSG_COMPACTIONKEY- See Also:
- Constant Field Values
-
SYNAPSE_MSG_PARTITIONKEY
public static final java.lang.String SYNAPSE_MSG_PARTITIONKEY- See Also:
- Constant Field Values
-
SYNAPSE_MSG_HEADERS
public static final java.lang.String SYNAPSE_MSG_HEADERS- See Also:
- Constant Field Values
-
SYNAPSE_MSG_PAYLOAD
public static final java.lang.String SYNAPSE_MSG_PAYLOAD- See Also:
- Constant Field Values
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 namejava.lang.NullPointerException- if the argument is null
-
defaultMessageFormat
Returns the default message format used by Synapse to encode messages.- Returns:
- the default message format
-
versionOf
Determines theMessageFormatfrom the string representation of some message.- Parameters:
message- the string representation of some message- Returns:
- MessageFormat of the message
-