Interface Http2Headers

All Superinterfaces:
Headers<java.lang.CharSequence, java.lang.CharSequence, Http2Headers>, java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence, java.lang.CharSequence>>
All Known Implementing Classes:
DefaultHttp2Headers, EmptyHttp2Headers, ReadOnlyHttp2Headers

public interface Http2Headers extends Headers<java.lang.CharSequence, java.lang.CharSequence, Http2Headers>
A collection of headers sent or received via HTTP/2.
  • Method Details

    • iterator

      java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence, java.lang.CharSequence>> iterator()
      Returns an iterator over all HTTP/2 headers. The iteration order is as follows: 1. All pseudo headers (order not specified). 2. All non-pseudo headers (in insertion order).
      Specified by:
      iterator in interface Headers<java.lang.CharSequence, java.lang.CharSequence, Http2Headers>
      Specified by:
      iterator in interface java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence, java.lang.CharSequence>>
    • valueIterator

      java.util.Iterator<java.lang.CharSequence> valueIterator(java.lang.CharSequence name)
      Equivalent to Headers.getAll(Object) but no intermediate list is generated.
      Parameters:
      name - the name of the header to retrieve
      Returns:
      an Iterator of header values corresponding to name.
    • method

      Http2Headers method(java.lang.CharSequence value)
    • scheme

      Http2Headers scheme(java.lang.CharSequence value)
    • authority

      Http2Headers authority(java.lang.CharSequence value)
    • path

      Http2Headers path(java.lang.CharSequence value)
    • status

      Http2Headers status(java.lang.CharSequence value)
    • method

      java.lang.CharSequence method()
      Gets the Http2Headers.PseudoHeaderName.METHOD header or null if there is no such header
    • scheme

      java.lang.CharSequence scheme()
      Gets the Http2Headers.PseudoHeaderName.SCHEME header or null if there is no such header
    • authority

      java.lang.CharSequence authority()
      Gets the Http2Headers.PseudoHeaderName.AUTHORITY header or null if there is no such header
    • path

      java.lang.CharSequence path()
      Gets the Http2Headers.PseudoHeaderName.PATH header or null if there is no such header
    • status

      java.lang.CharSequence status()
      Gets the Http2Headers.PseudoHeaderName.STATUS header or null if there is no such header
    • contains

      boolean contains(java.lang.CharSequence name, java.lang.CharSequence value, boolean caseInsensitive)
      Returns true if a header with the name and value exists, false otherwise.

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

      Parameters:
      name - the name of the header to find
      value - the value of the header to find
      caseInsensitive - true then a case insensitive compare is run to compare values. otherwise a case sensitive compare is run to compare values.