use of org.apache.servicecomb.provider.pojo.definition.PojoConsumerMeta in project java-chassis by ServiceComb.
the class PojoConsumerMetaRefresher method refreshMeta.
protected PojoConsumerMeta refreshMeta() {
MicroserviceReferenceConfig microserviceReferenceConfig = scbEngine.createMicroserviceReferenceConfig(microserviceName);
MicroserviceMeta microserviceMeta = microserviceReferenceConfig.getLatestMicroserviceMeta();
SchemaMeta schemaMeta = findSchemaMeta(microserviceMeta);
if (schemaMeta == null) {
throw new IllegalStateException(String.format("Schema not exist, microserviceName=%s, schemaId=%s, consumer interface=%s; " + "new producer not running or not deployed.", microserviceName, schemaId, consumerIntf.getName()));
}
SwaggerConsumer swaggerConsumer = scbEngine.getSwaggerEnvironment().createConsumer(consumerIntf, schemaMeta.getSwagger());
return new PojoConsumerMeta(microserviceReferenceConfig, swaggerConsumer, schemaMeta);
}
use of org.apache.servicecomb.provider.pojo.definition.PojoConsumerMeta 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;
}
use of org.apache.servicecomb.provider.pojo.definition.PojoConsumerMeta in project incubator-servicecomb-java-chassis by apache.
the class PojoConsumerMetaRefresher method refreshMeta.
protected PojoConsumerMeta refreshMeta() {
MicroserviceReferenceConfig microserviceReferenceConfig = scbEngine.createMicroserviceReferenceConfig(microserviceName);
MicroserviceMeta microserviceMeta = microserviceReferenceConfig.getLatestMicroserviceMeta();
SchemaMeta schemaMeta = findSchemaMeta(microserviceMeta);
if (schemaMeta == null) {
throw new IllegalStateException(String.format("Schema not exist, microserviceName=%s, schemaId=%s, consumer interface=%s; " + "new producer not running or not deployed.", microserviceName, schemaId, consumerIntf.getName()));
}
SwaggerConsumer swaggerConsumer = scbEngine.getSwaggerEnvironment().createConsumer(consumerIntf, schemaMeta.getSwagger());
return new PojoConsumerMeta(microserviceReferenceConfig, swaggerConsumer, schemaMeta);
}
use of org.apache.servicecomb.provider.pojo.definition.PojoConsumerMeta 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;
}
Aggregations