Class CompositeResponseHeaders
- java.lang.Object
-
- com.adaptris.okhttp.headers.response.CompositeResponseHeaders
-
- All Implemented Interfaces:
ResponseHeaderHandler<okhttp3.Response>
public class CompositeResponseHeaders extends java.lang.Object implements ResponseHeaderHandler<okhttp3.Response>
Implementation ofResponseHeaderHandler
that uses nested handlers to extract headers. This implementation is primarily so that you can mix and matchhow you capture response headers; If you wanted to use bothResponseHeadersAsMetadata
andResponseHeadersAsObjectMetadata
then you can.In the adapter configuration file this class is aliased as http-composite-request-headers which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description CompositeResponseHeaders()
CompositeResponseHeaders(ResponseHeaderHandler<okhttp3.Response>... handlers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHandler(ResponseHeaderHandler<okhttp3.Response> handler)
java.util.List<ResponseHeaderHandler<okhttp3.Response>>
getHandlers()
AdaptrisMessage
handle(okhttp3.Response repsonse, AdaptrisMessage msg)
void
setHandlers(java.util.List<ResponseHeaderHandler<okhttp3.Response>> handlers)
-
-
-
Constructor Detail
-
CompositeResponseHeaders
public CompositeResponseHeaders()
-
CompositeResponseHeaders
public CompositeResponseHeaders(ResponseHeaderHandler<okhttp3.Response>... handlers)
-
-
Method Detail
-
getHandlers
public java.util.List<ResponseHeaderHandler<okhttp3.Response>> getHandlers()
-
setHandlers
public void setHandlers(java.util.List<ResponseHeaderHandler<okhttp3.Response>> handlers)
-
addHandler
public void addHandler(ResponseHeaderHandler<okhttp3.Response> handler)
-
handle
public AdaptrisMessage handle(okhttp3.Response repsonse, AdaptrisMessage msg)
- Specified by:
handle
in interfaceResponseHeaderHandler<okhttp3.Response>
-
-