public abstract class BasicRestCallInterceptor extends Object implements RestCallInterceptor
RestCallInterceptor
.
All default methods are no-ops.Constructor and Description |
---|
BasicRestCallInterceptor() |
Modifier and Type | Method and Description |
---|---|
void |
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 after
RestRequest object is created and all headers/query/form-data has been
copied from the client to the request object. |
public BasicRestCallInterceptor()
public void onInit(RestRequest req) throws Exception
RestCallInterceptor
RestRequest
object is created and all headers/query/form-data has been
copied from the client to the request object.onInit
in interface RestCallInterceptor
req
- The HTTP request object.Exception
- Any exception can be thrown.
RestCallException
or RuntimeException
, will be wrapped in a RestCallException
.public void onConnect(RestRequest req, RestResponse res) throws Exception
RestCallInterceptor
onConnect
in interface RestCallInterceptor
req
- The HTTP request object.res
- The HTTP response object.Exception
- Any exception can be thrown.
RestCallException
or RuntimeException
, will be wrapped in a RestCallException
.public void onClose(RestRequest req, RestResponse res) throws Exception
RestCallInterceptor
onClose
in interface RestCallInterceptor
req
- The request object.res
- The response object.RestCallException
- Error occurred during call.Exception
- Any exception can be thrown.
RestCallException
or RuntimeException
, will be wrapped in a RestCallException
.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.