Class MessageHeaderValue.NativeValue

java.lang.Object
io.helidon.messaging.MessageHeaderValue.NativeValue
All Implemented Interfaces:
MessageHeaderValue
Enclosing interface:
MessageHeaderValue

public static final class MessageHeaderValue.NativeValue extends Object implements MessageHeaderValue
Immutable transport-specific encoded messaging value.
  • Method Details

    • create

      public static MessageHeaderValue.NativeValue create(String typeId, byte[] value)
      Create an immutable transport-specific encoded value.

      The type identifier must identify the connector or encoding well enough for a consumer to interpret the bytes. This value does not imply Java serialization or cross-connector portability; another connector can interpret it only when both connectors share the identified encoding.

      Parameters:
      typeId - non-blank type identifier
      value - encoded bytes to copy
      Returns:
      native encoded value
      Throws:
      NullPointerException - if typeId or value is null
      IllegalArgumentException - if typeId is blank
    • typeId

      public String typeId()
      Connector or encoding type identifier.
      Returns:
      type identifier
    • value

      public byte[] value()
      Encoded value copy.
      Returns:
      copied bytes
    • size

      public int size()
      Number of encoded bytes.
      Returns:
      byte count
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object