Package org.chenile.proxy.interceptors
Class ResponseBodyTypeSelector
java.lang.Object
org.chenile.core.interceptors.BaseChenileInterceptor
org.chenile.proxy.interceptors.ResponseBodyTypeSelector
- All Implemented Interfaces:
Command<ChenileExchange>
This class calculates the correct type for the response body. It will be of type GenericResponse where
T is the return type of the underlying service. The underlying service return type can be represented as
a ParameterizedType of as a Class object, The treatment differs depending on what got specified
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doPreProcessing
(ChenileExchange exchange) Override this to do pre-processing.Methods inherited from class org.chenile.core.interceptors.BaseChenileInterceptor
bypassInterception, doContinue, doPostProcessing, execute, getExtensionByAnnotation, getExtensionByAnnotation, resumeFromSavedPoint, savePoint
-
Constructor Details
-
ResponseBodyTypeSelector
public ResponseBodyTypeSelector()
-
-
Method Details
-
doPreProcessing
Description copied from class:BaseChenileInterceptor
Override this to do pre-processing. This will be called before the service is invoked. Don't expect to see exception or response being set inChenileExchange
. However you can check forChenileExchange.getBody()
to manipulate the body if this interceptor is a Chenile post processor or a service specific or operation specific interceptor.
If this interceptor is a Chenile pre-processor, thenChenileExchange.getBody()
will return null. Then you need to look at headers only.- Overrides:
doPreProcessing
in classBaseChenileInterceptor
-