Search in sources :

Example 1 with ProducerResponseMapper

use of io.servicecomb.swagger.invocation.response.producer.ProducerResponseMapper in project java-chassis by ServiceComb.

the class ProducerSchemaFactory method createOperation.

protected void createOperation(ProducerSchemaContext context, OperationMeta operationMeta, ProducerArgumentsMapper argsMapper) {
    Object producerInstance = context.getProducerInstance();
    Method method = ReflectUtils.findMethod(producerInstance.getClass(), operationMeta.getMethod().getName());
    ProducerResponseMapper responseMapper = responseMapperFactory.createResponseMapper(method.getReturnType());
    ProducerOperation producerOperation = new ProducerOperation(producerInstance, method, argsMapper, responseMapper);
    operationMeta.putExtData(Const.PRODUCER_OPERATION, producerOperation);
}
Also used : ProducerResponseMapper(io.servicecomb.swagger.invocation.response.producer.ProducerResponseMapper) ProducerOperation(io.servicecomb.core.provider.producer.ProducerOperation) Method(java.lang.reflect.Method)

Aggregations

ProducerOperation (io.servicecomb.core.provider.producer.ProducerOperation)1 ProducerResponseMapper (io.servicecomb.swagger.invocation.response.producer.ProducerResponseMapper)1 Method (java.lang.reflect.Method)1