Package com.consol.citrus.message
Enum MessageHeaderType
- java.lang.Object
-
- java.lang.Enum<MessageHeaderType>
-
- com.consol.citrus.message.MessageHeaderType
-
- All Implemented Interfaces:
Serializable,Comparable<MessageHeaderType>
public enum MessageHeaderType extends Enum<MessageHeaderType>
Enumeration for supported message header types. Header values are able to define a type. In this case they are typed header values. Message sender/receiver will try to set typed header values according to this.- Author:
- Christoph Deppisch
-
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE_PREFIXIdentifying prefix and suffix for typed header valuesstatic StringTYPE_SUFFIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcreateTypedValue(String type, String value)Creates a typed header value with type and value.static MessageHeaderTypefromTypedValue(String headerValue)Try to find MessageHeaderType from a typed header value.Class<?>getHeaderClass()Gets the clazz.StringgetName()Gets the name.static booleanisTyped(String headerValue)Checks if this header value is typed with matching type prefix.static StringremoveTypeDefinition(String headerValue)Removes the type definition form a typed header value.static MessageHeaderTypevalueOf(String name)Returns the enum constant of this type with the specified name.static MessageHeaderType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INTEGER
public static final MessageHeaderType INTEGER
-
LONG
public static final MessageHeaderType LONG
-
FLOAT
public static final MessageHeaderType FLOAT
-
DOUBLE
public static final MessageHeaderType DOUBLE
-
BYTE
public static final MessageHeaderType BYTE
-
SHORT
public static final MessageHeaderType SHORT
-
BOOLEAN
public static final MessageHeaderType BOOLEAN
-
STRING
public static final MessageHeaderType STRING
-
-
Field Detail
-
TYPE_PREFIX
public static final String TYPE_PREFIX
Identifying prefix and suffix for typed header values- See Also:
- Constant Field Values
-
TYPE_SUFFIX
public static final String TYPE_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static MessageHeaderType[] 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 (MessageHeaderType c : MessageHeaderType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageHeaderType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isTyped
public static boolean isTyped(String headerValue)
Checks if this header value is typed with matching type prefix.- Parameters:
headerValue-- Returns:
-
createTypedValue
public static String createTypedValue(String type, String value)
Creates a typed header value with type and value.- Parameters:
type-value-- Returns:
-
fromTypedValue
public static MessageHeaderType fromTypedValue(String headerValue)
Try to find MessageHeaderType from a typed header value. The type definition is located at the beginning of the header value with respective type definition prefix and suffix.- Parameters:
headerValue-- Returns:
-
removeTypeDefinition
public static String removeTypeDefinition(String headerValue)
Removes the type definition form a typed header value.- Parameters:
headerValue-- Returns:
-
getName
public String getName()
Gets the name.- Returns:
- the name the name to get.
-
getHeaderClass
public Class<?> getHeaderClass()
Gets the clazz.- Returns:
- the clazz the clazz to get.
-
-