Search in sources :

Example 6 with RequestMetadata

use of org.apache.dubbo.metadata.rest.RequestMetadata in project dubbo by alibaba.

the class HeaderParamParameterProcessor method process.

@Override
protected void process(String headerName, String defaultValue, Annotation annotation, Object parameter, int parameterIndex, Method method, RestMethodMetadata restMethodMetadata) {
    RequestMetadata requestMetadata = restMethodMetadata.getRequest();
    // Add the placeholder as header value
    requestMetadata.addHeader(headerName, buildDefaultValue(parameterIndex));
}
Also used : RequestMetadata(org.apache.dubbo.metadata.rest.RequestMetadata)

Example 7 with RequestMetadata

use of org.apache.dubbo.metadata.rest.RequestMetadata in project dubbo by alibaba.

the class HeaderParamParameterProcessor method process.

@Override
protected void process(String headerName, String defaultValue, AnnotationMirror annotation, VariableElement parameter, int parameterIndex, ExecutableElement method, RestMethodMetadata restMethodMetadata) {
    RequestMetadata requestMetadata = restMethodMetadata.getRequest();
    // Add the placeholder as header value
    requestMetadata.addHeader(headerName, buildDefaultValue(parameterIndex));
}
Also used : RequestMetadata(org.apache.dubbo.metadata.rest.RequestMetadata)

Aggregations

RequestMetadata (org.apache.dubbo.metadata.rest.RequestMetadata)7 LinkedHashSet (java.util.LinkedHashSet)1 ExecutableElement (javax.lang.model.element.ExecutableElement)1 MethodDefinition (org.apache.dubbo.metadata.definition.model.MethodDefinition)1 RestMethodMetadata (org.apache.dubbo.metadata.rest.RestMethodMetadata)1