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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onClose
(RestRequest req, RestResponse res) Called when the response body is consumed.void
onConnect
(RestRequest req, RestResponse res) Called immediately after an HTTP response has been received.void
onInit
(RestRequest req) Called immediately afterRestRequest
object 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
-
onInit
Description copied from interface:RestCallInterceptor
Called immediately afterRestRequest
object is created and all headers/query/form-data has been copied from the client to the request object.- Specified by:
onInit
in interfaceRestCallInterceptor
- Parameters:
req
- The HTTP request object.- Throws:
Exception
- Any exception can be thrown.
If not aRestCallException
orRuntimeException
, will be wrapped in aRestCallException
.
-
onConnect
Description copied from interface:RestCallInterceptor
Called immediately after an HTTP response has been received.- Specified by:
onConnect
in interfaceRestCallInterceptor
- Parameters:
req
- The HTTP request object.res
- The HTTP response object.- Throws:
Exception
- Any exception can be thrown.
If not aRestCallException
orRuntimeException
, will be wrapped in aRestCallException
.
-
onClose
Description copied from interface:RestCallInterceptor
Called when the response body is consumed.- Specified by:
onClose
in interfaceRestCallInterceptor
- Parameters:
req
- The request object.res
- The response object.- Throws:
RestCallException
- Error occurred during call.Exception
- Any exception can be thrown.
If not aRestCallException
orRuntimeException
, will be wrapped in aRestCallException
.
-