public class LoggingInterceptor extends Object implements IClientInterceptor
| Constructor and Description |
|---|
LoggingInterceptor()
Constructor
|
LoggingInterceptor(boolean theVerbose)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
interceptRequest(org.apache.http.client.methods.HttpRequestBase theRequest)
Fired by the client just before invoking the HTTP client request
|
void |
interceptResponse(org.apache.http.HttpResponse theResponse)
Fired by the client upon receiving an HTTP response, prior to processing that response
|
void |
setLogger(org.slf4j.Logger theLogger)
Sets a logger to use to log messages (default is a logger with this class' name).
|
void |
setLogRequestBody(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
|
void |
setLogRequestHeaders(boolean theValue)
Should headers for each request be logged, containing the URL and other information
|
void |
setLogRequestSummary(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
|
void |
setLogResponseBody(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
|
void |
setLogResponseHeaders(boolean theValue)
Should headers for each request be logged, containing the URL and other information
|
void |
setLogResponseSummary(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
|
public LoggingInterceptor()
public LoggingInterceptor(boolean theVerbose)
theVerbose - If set to true, all logging is enabledpublic void interceptRequest(org.apache.http.client.methods.HttpRequestBase theRequest)
IClientInterceptorinterceptRequest in interface IClientInterceptorpublic void interceptResponse(org.apache.http.HttpResponse theResponse) throws IOException
IClientInterceptorinterceptResponse in interface IClientInterceptorIOExceptionpublic void setLogger(org.slf4j.Logger theLogger)
theLogger - The logger to use. Must not be null.public void setLogRequestBody(boolean theValue)
public void setLogRequestHeaders(boolean theValue)
public void setLogRequestSummary(boolean theValue)
public void setLogResponseBody(boolean theValue)
public void setLogResponseHeaders(boolean theValue)
public void setLogResponseSummary(boolean theValue)
Copyright © 2014–2016 University Health Network. All rights reserved.