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);
}
Aggregations