Interface HeaderOptionalSupplier<T>

Type Parameters:
T -
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface HeaderOptionalSupplier<T>
Supplies an Optional for a header type. This presumes that the returned type can be cast to a String. If additional conversion logic is required, then implementations of this type must provide custom logic by overriding the default method asString(String)
  • Method Summary

    Modifier and Type
    Method
    Description
    default Optional<String>
    Converts the value to an Optional<String>
    get(String name)
    Gets the resulting header value with the supplied name.
    default org.slf4j.Logger
    Gets the Logger used by this instance.
  • Method Details

    • get

      Optional<T> get(String name)
      Gets the resulting header value with the supplied name.
      Parameters:
      name - the name of the header
      Returns:
      the Optional<T>
    • asString

      default Optional<String> asString(String name)
      Converts the value to an Optional<String>
      Parameters:
      name - the header name
      Returns:
      the value, or null
    • logger

      default org.slf4j.Logger logger()
      Gets the Logger used by this instance. By default, this returns the
      Returns:
      the Logger