use of org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl in project java-chassis by ServiceComb.
the class UrlPathAccessItem method appendClientFormattedItem.
@Override
public void appendClientFormattedItem(InvocationFinishEvent finishEvent, StringBuilder builder) {
OperationMeta operationMeta = finishEvent.getInvocation().getOperationMeta();
SchemaMeta schemaMeta = finishEvent.getInvocation().getSchemaMeta();
if (operationMeta != null && schemaMeta != null && schemaMeta.getSwagger() != null) {
builder.append(schemaMeta.getSwagger().getBasePath()).append(operationMeta.getOperationPath());
return;
}
RestClientRequestImpl restRequestImpl = (RestClientRequestImpl) finishEvent.getInvocation().getHandlerContext().get(RestConst.INVOCATION_HANDLER_REQUESTCLIENT);
if (null == restRequestImpl || null == restRequestImpl.getRequest() || StringUtils.isEmpty(restRequestImpl.getRequest().path())) {
builder.append(EMPTY_RESULT);
return;
}
builder.append(restRequestImpl.getRequest().path());
}
Aggregations