Enum 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
    • 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 name
        NullPointerException - 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.