Class DefaultStompHeaders

java.lang.Object
io.netty.handler.codec.DefaultHeaders<java.lang.CharSequence, java.lang.CharSequence, StompHeaders>
io.netty.handler.codec.stomp.DefaultStompHeaders
All Implemented Interfaces:
Headers<java.lang.CharSequence, java.lang.CharSequence, StompHeaders>, StompHeaders, java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence, java.lang.CharSequence>>

public class DefaultStompHeaders extends DefaultHeaders<java.lang.CharSequence, java.lang.CharSequence, StompHeaders> implements StompHeaders
  • Constructor Details

    • DefaultStompHeaders

      public DefaultStompHeaders()
  • Method Details

    • getAsString

      public java.lang.String getAsString(java.lang.CharSequence name)
      Description copied from interface: StompHeaders
      Headers.get(Object) and convert the result to a String.
      Specified by:
      getAsString in interface StompHeaders
      Parameters:
      name - the name of the header to retrieve
      Returns:
      the first header value if the header is found. null if there's no such header.
    • getAllAsString

      public java.util.List<java.lang.String> getAllAsString(java.lang.CharSequence name)
      Description copied from interface: StompHeaders
      Headers.getAll(Object) and convert each element of List to a String.
      Specified by:
      getAllAsString in interface StompHeaders
      Parameters:
      name - the name of the header to retrieve
      Returns:
      a List of header values or an empty List if no values are found.
    • iteratorAsString

      public java.util.Iterator<java.util.Map.Entry<java.lang.String, java.lang.String>> iteratorAsString()
      Description copied from interface: StompHeaders
      Headers.iterator() that converts each Map.Entry's key and value to a String.
      Specified by:
      iteratorAsString in interface StompHeaders
    • contains

      public boolean contains(java.lang.CharSequence name, java.lang.CharSequence value)
      Description copied from interface: Headers
      Returns true if a header with the name and value exists, false otherwise.

      The Object.equals(Object) method is used to test for equality of value.

      Specified by:
      contains in interface Headers<java.lang.CharSequence, java.lang.CharSequence, StompHeaders>
      Overrides:
      contains in class DefaultHeaders<java.lang.CharSequence, java.lang.CharSequence, StompHeaders>
      Parameters:
      name - the header name
      value - the header value of the header to find
    • contains

      public boolean contains(java.lang.CharSequence name, java.lang.CharSequence value, boolean ignoreCase)
      Description copied from interface: StompHeaders
      Returns true if a header with the name and value exists, false otherwise.

      If ignoreCase is true then a case insensitive compare is done on the value.

      Specified by:
      contains in interface StompHeaders
      Parameters:
      name - the name of the header to find
      value - the value of the header to find
      ignoreCase - true then a case insensitive compare is run to compare values. otherwise a case sensitive compare is run to compare values.
    • copy

      public DefaultStompHeaders copy()
      Description copied from class: DefaultHeaders
      Returns a deep copy of this instance.
      Overrides:
      copy in class DefaultHeaders<java.lang.CharSequence, java.lang.CharSequence, StompHeaders>