Package org.apache.juneau.rest.client
Interface RestCallInterceptor
- All Known Implementing Classes:
- BasicRestCallInterceptor
public interface RestCallInterceptor
Used to intercept http connection responses to allow modification of that response before processing and for
 listening for call lifecycle events.
 
 The BasicRestCallInterceptor is provided as an adapter class for implementing this interface.
 
 Note that the RestClient class itself implements this interface so you can achieve the same results by
 overriding the methods on the client class as well.
 
Example:
   
See Also:
- 
Method SummaryModifier 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.
- 
Method Details- 
onInitCalled immediately afterRestRequestobject is created and all headers/query/form-data has been copied from the client to the request object.- Parameters:
- req- The HTTP request object.
- Throws:
- Exception- Any exception can be thrown.
 If not a- RestCallExceptionor- RuntimeException, will be wrapped in a- RestCallException.
 
- 
onConnectCalled immediately after an HTTP response has been received.- Parameters:
- req- The HTTP request object.
- res- The HTTP response object.
- Throws:
- Exception- Any exception can be thrown.
 If not a- RestCallExceptionor- RuntimeException, will be wrapped in a- RestCallException.
 
- 
onCloseCalled when the response body is consumed.- Parameters:
- req- The request object.
- res- The response object.
- Throws:
- RestCallException- Error occurred during call.
- Exception- Any exception can be thrown.
 If not a- RestCallExceptionor- RuntimeException, will be wrapped in a- RestCallException.
 
 
-