Interface Headers


public interface Headers
Object representing a chain of protocol headers.

It provides read/write access to the headers of the underlying protocol.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(String name, String value)
    Add given header name and corresponding value.
    long
    Gets the native pointer used by this class to make native method calls.
    Gets the object stored in this object user's data
    getValue(String headerName)
    Search for a given header name and return its value.
    void
    remove(String name)
    Add given header name and corresponding value.
    void
    Sets the object to store in this object user's data
     
  • Method Details

    • add

      void add(@NonNull String name, @Nullable String value)
      Add given header name and corresponding value.

      Parameters:
      name - the header's name
      value - the header's value
    • getValue

      @Nullable String getValue(String headerName)
      Search for a given header name and return its value.

      Returns:
      the header's value or null if not found.
    • remove

      void remove(@NonNull String name)
      Add given header name and corresponding value.

      Parameters:
      name - the header's name
    • setUserData

      void setUserData(Object data)
      Sets the object to store in this object user's data
      Parameters:
      data - the object to store
    • getUserData

      Object getUserData()
      Gets the object stored in this object user's data
      Returns:
      the object store if any, null otherwise
    • getNativePointer

      long getNativePointer()
      Gets the native pointer used by this class to make native method calls.
      Returns:
      the nativer pointer, as long
    • toString

      String toString()
      Overrides:
      toString in class Object