Class MetadataResponseHeaders

java.lang.Object
com.adaptris.okhttp.headers.response.MetadataResponseHeaders
All Implemented Interfaces:
ResponseHeaderHandler<okhttp3.Response>

public class MetadataResponseHeaders extends Object implements ResponseHeaderHandler<okhttp3.Response>

In the adapter configuration file this class is aliased as okhttp-response-headers-as-metadata which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • MetadataResponseHeaders

      public MetadataResponseHeaders()
    • MetadataResponseHeaders

      public MetadataResponseHeaders(String prefix, String separator)
    • MetadataResponseHeaders

      public MetadataResponseHeaders(String prefix)
  • Method Details

    • handle

      public AdaptrisMessage handle(okhttp3.Response response, AdaptrisMessage msg)
      Specified by:
      handle in interface ResponseHeaderHandler<okhttp3.Response>
    • getMetadataPrefix

      public String getMetadataPrefix()
      Get the metadata prefix.
      Returns:
      The metadata prefix.
    • setMetadataPrefix

      public void setMetadataPrefix(String metadataPrefix)
      Set the metadata prefix.
      Parameters:
      metadataPrefix - The metadata prefix.
    • getMetadataSeparator

      public String getMetadataSeparator()
      Get the metadata separator.
      Returns:
      The metadata separator.
    • setMetadataSeparator

      public void setMetadataSeparator(String s)
      Set the separator to be used when multiple headers should be associated with the same key.
      Parameters:
      s - the separator (default if not specified is "\t");