Class TransformationClassSelector

java.lang.Object
org.chenile.core.interceptors.BaseChenileInterceptor
org.chenile.core.transform.TransformationClassSelector
All Implemented Interfaces:
Command<ChenileExchange>

public class TransformationClassSelector extends BaseChenileInterceptor
Determines the target type for the body of the ChenileExchange and populates that into ChenileExchange.getBodyType() Uses registered bodyTypeSelectors either at ChenileServiceDefinition or OperationDefinition
Author:
Raja Shankar Kolluru
  • Constructor Details

    • TransformationClassSelector

      public TransformationClassSelector()
  • Method Details

    • doPreProcessing

      public void doPreProcessing(ChenileExchange exchange)
      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 in ChenileExchange. However you can check for ChenileExchange.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, then ChenileExchange.getBody() will return null. Then you need to look at headers only.
      Overrides:
      doPreProcessing in class BaseChenileInterceptor
    • obtainBodyTypeSelector

      private Command<ChenileExchange> obtainBodyTypeSelector(ChenileExchange exchange)
    • setDefaultBodyType

      private void setDefaultBodyType(ChenileExchange exchange)
    • convertClassToTypeReference

      public static com.fasterxml.jackson.core.type.TypeReference<?> convertClassToTypeReference(Class<?> clazz)