use of com.alipay.sofa.rpc.boot.runtime.param.RpcBindingParam in project sofa-boot by alipay.
the class BoltBindingConverter method convert.
@Override
public RpcBinding convert(SofaService sofaServiceAnnotation, SofaServiceBinding sofaServiceBindingAnnotation, BindingConverterContext bindingConverterContext) {
RpcBindingParam bindingParam = new BoltBindingParam();
convertServiceAnnotation(bindingParam, sofaServiceAnnotation, sofaServiceBindingAnnotation, bindingConverterContext);
return new BoltBinding(bindingParam, bindingConverterContext.getApplicationContext(), bindingConverterContext.isInBinding());
}
use of com.alipay.sofa.rpc.boot.runtime.param.RpcBindingParam in project sofa-boot by alipay.
the class DubboBindingConverter method convert.
@Override
public RpcBinding convert(SofaService sofaServiceAnnotation, SofaServiceBinding sofaServiceBindingAnnotation, BindingConverterContext bindingConverterContext) {
RpcBindingParam bindingParam = new DubboBindingParam();
convertServiceAnnotation(bindingParam, sofaServiceAnnotation, sofaServiceBindingAnnotation, bindingConverterContext);
return new DubboBinding(bindingParam, bindingConverterContext.getApplicationContext(), bindingConverterContext.isInBinding());
}
use of com.alipay.sofa.rpc.boot.runtime.param.RpcBindingParam in project sofa-boot by alipay.
the class HttpBindingConverter method convert.
@Override
public RpcBinding convert(SofaReference sofaReferenceAnnotation, SofaReferenceBinding sofaReferenceBindingAnnotation, BindingConverterContext bindingConverterContext) {
RpcBindingParam bindingParam = new HttpBindingParam();
convertReferenceAnnotation(bindingParam, sofaReferenceBindingAnnotation, bindingConverterContext);
return new HttpBinding(bindingParam, bindingConverterContext.getApplicationContext(), bindingConverterContext.isInBinding());
}
use of com.alipay.sofa.rpc.boot.runtime.param.RpcBindingParam in project sofa-boot by alipay.
the class RestBindingConverter method convert.
@Override
public RpcBinding convert(SofaReference sofaReferenceAnnotation, SofaReferenceBinding sofaReferenceBindingAnnotation, BindingConverterContext bindingConverterContext) {
RpcBindingParam bindingParam = new RestBindingParam();
convertReferenceAnnotation(bindingParam, sofaReferenceBindingAnnotation, bindingConverterContext);
return new RestBinding(bindingParam, bindingConverterContext.getApplicationContext(), bindingConverterContext.isInBinding());
}
use of com.alipay.sofa.rpc.boot.runtime.param.RpcBindingParam in project sofa-boot by alipay.
the class RpcBindingConverter method convert.
/**
* convert xml Element to concrete {@link RpcBinding}
*
* @param element xml Element
* @param bindingConverterContext binding converter context
* @return RpcBinding Object
*/
@Override
public RpcBinding convert(Element element, BindingConverterContext bindingConverterContext) {
RpcBindingParam param = createRpcBindingParam();
// global-attrs,filter,method,route
Element globalAttrsElement = DomUtils.getChildElementByTagName(element, RpcBindingXmlConstants.TAG_GLOBAL_ATTRS);
Element routeElement = DomUtils.getChildElementByTagName(element, RpcBindingXmlConstants.TAG_ROUTE);
List<Element> methodElements = DomUtils.getChildElementsByTagName(element, RpcBindingXmlConstants.TAG_METHOD);
List<Element> parameterElements = DomUtils.getChildElementsByTagName(element, RpcBindingXmlConstants.TAG_PARAMETER);
parseGlobalAttrs(globalAttrsElement, param, bindingConverterContext);
parseFilter(globalAttrsElement, param, bindingConverterContext);
parseMethod(methodElements, param);
parseRoute(routeElement, param);
parseParameter(parameterElements, param);
return convert(param, bindingConverterContext);
}
Aggregations