Search in sources :

Example 1 with PojoConsumerOperationMeta

use of org.apache.servicecomb.provider.pojo.definition.PojoConsumerOperationMeta in project java-chassis by ServiceComb.

the class PojoInvocationCreator method create.

public PojoInvocation create(Method method, PojoConsumerMetaRefresher metaRefresher, Object[] args) {
    PojoConsumerMeta pojoConsumerMeta = metaRefresher.getLatestMeta();
    PojoConsumerOperationMeta consumerOperationMeta = pojoConsumerMeta.ensureFindOperationMeta(method);
    PojoInvocation invocation = new PojoInvocation(consumerOperationMeta);
    invocation.setSuccessResponseType(consumerOperationMeta.getResponsesType());
    invocation.setInvocationArguments(consumerOperationMeta.getSwaggerConsumerOperation().toInvocationArguments(args));
    invocation.setSync(consumerOperationMeta.isSync());
    return invocation;
}
Also used : PojoConsumerOperationMeta(org.apache.servicecomb.provider.pojo.definition.PojoConsumerOperationMeta) PojoConsumerMeta(org.apache.servicecomb.provider.pojo.definition.PojoConsumerMeta)

Example 2 with PojoConsumerOperationMeta

use of org.apache.servicecomb.provider.pojo.definition.PojoConsumerOperationMeta in project incubator-servicecomb-java-chassis by apache.

the class PojoInvocationCreator method create.

public PojoInvocation create(Method method, PojoConsumerMetaRefresher metaRefresher, Object[] args) {
    PojoConsumerMeta pojoConsumerMeta = metaRefresher.getLatestMeta();
    PojoConsumerOperationMeta consumerOperationMeta = pojoConsumerMeta.ensureFindOperationMeta(method);
    PojoInvocation invocation = new PojoInvocation(consumerOperationMeta);
    invocation.setSuccessResponseType(consumerOperationMeta.getResponsesType());
    invocation.setInvocationArguments(consumerOperationMeta.getSwaggerConsumerOperation().toInvocationArguments(args));
    invocation.setSync(consumerOperationMeta.isSync());
    return invocation;
}
Also used : PojoConsumerOperationMeta(org.apache.servicecomb.provider.pojo.definition.PojoConsumerOperationMeta) PojoConsumerMeta(org.apache.servicecomb.provider.pojo.definition.PojoConsumerMeta)

Aggregations

PojoConsumerMeta (org.apache.servicecomb.provider.pojo.definition.PojoConsumerMeta)2 PojoConsumerOperationMeta (org.apache.servicecomb.provider.pojo.definition.PojoConsumerOperationMeta)2