Class HttpFields.Mutable.Wrapper

java.lang.Object
org.eclipse.jetty.http.HttpFields.Mutable.Wrapper
All Implemented Interfaces:
Iterable<HttpField>, Supplier<HttpFields>, HttpFields, HttpFields.Mutable
Enclosing interface:
HttpFields.Mutable

public static class HttpFields.Mutable.Wrapper extends Object implements HttpFields.Mutable
A wrapper of HttpFields.
  • Constructor Details

  • Method Details

    • onAddField

      public HttpField onAddField(HttpField field)
      Called when a field is added (including as part of a put).
      Parameters:
      field - The field being added.
      Returns:
      The field to add, or null if the add is to be ignored.
    • onRemoveField

      public boolean onRemoveField(HttpField field)
      Called when a field is removed (including as part of a put).
      Parameters:
      field - The field being removed.
      Returns:
      True if the field should be removed, false otherwise.
    • takeAsImmutable

      public HttpFields takeAsImmutable()
      Description copied from interface: HttpFields
      Efficiently take the fields as an Immutable that cannot be changed by any further mutations to this instance.
      Specified by:
      takeAsImmutable in interface HttpFields
      Returns:
      An immutable version of the fields.
    • size

      public int size()
      Specified by:
      size in interface HttpFields
    • stream

      public Stream<HttpField> stream()
      Specified by:
      stream in interface HttpFields
    • add

      public HttpFields.Mutable add(HttpField field)
      Specified by:
      add in interface HttpFields.Mutable
    • listIterator

      public ListIterator<HttpField> listIterator()
      Specified by:
      listIterator in interface HttpFields.Mutable