Package org.apache.juneau.rest.client
Class BasicRestCallInterceptor
java.lang.Object
org.apache.juneau.rest.client.BasicRestCallInterceptor
- All Implemented Interfaces:
RestCallInterceptor
A default implementation of a
RestCallInterceptor.
All default methods are no-ops.
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonClose(RestRequest req, RestResponse res) Called when the response body is consumed.voidonConnect(RestRequest req, RestResponse res) Called immediately after an HTTP response has been received.voidonInit(RestRequest req) Called immediately afterRestRequestobject is created and all headers/query/form-data has been copied from the client to the request object.
-
Constructor Details
-
BasicRestCallInterceptor
public BasicRestCallInterceptor()
-
-
Method Details
-
onClose
Description copied from interface:RestCallInterceptorCalled when the response body is consumed.- Specified by:
onClosein interfaceRestCallInterceptor- Parameters:
req- The request object.res- The response object.- Throws:
RestCallException- Error occurred during call.Exception- Any exception can be thrown.
If not aRestCallExceptionorRuntimeException, will be wrapped in aRestCallException.
-
onConnect
Description copied from interface:RestCallInterceptorCalled immediately after an HTTP response has been received.- Specified by:
onConnectin interfaceRestCallInterceptor- Parameters:
req- The HTTP request object.res- The HTTP response object.- Throws:
Exception- Any exception can be thrown.
If not aRestCallExceptionorRuntimeException, will be wrapped in aRestCallException.
-
onInit
Description copied from interface:RestCallInterceptorCalled immediately afterRestRequestobject is created and all headers/query/form-data has been copied from the client to the request object.- Specified by:
onInitin interfaceRestCallInterceptor- Parameters:
req- The HTTP request object.- Throws:
Exception- Any exception can be thrown.
If not aRestCallExceptionorRuntimeException, will be wrapped in aRestCallException.
-