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 Summary
ConstructorsConstructorDescriptionMetadataResponseHeaders(String prefix) MetadataResponseHeaders(String prefix, String separator) -
Method Summary
Modifier and TypeMethodDescriptionGet the metadata prefix.Get the metadata separator.handle(okhttp3.Response response, AdaptrisMessage msg) voidsetMetadataPrefix(String metadataPrefix) Set the metadata prefix.voidSet the separator to be used when multiple headers should be associated with the same key.
-
Constructor Details
-
MetadataResponseHeaders
public MetadataResponseHeaders() -
MetadataResponseHeaders
-
MetadataResponseHeaders
-
-
Method Details
-
handle
- Specified by:
handlein interfaceResponseHeaderHandler<okhttp3.Response>
-
getMetadataPrefix
Get the metadata prefix.- Returns:
- The metadata prefix.
-
setMetadataPrefix
Set the metadata prefix.- Parameters:
metadataPrefix- The metadata prefix.
-
getMetadataSeparator
Get the metadata separator.- Returns:
- The metadata separator.
-
setMetadataSeparator
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");
-