Search in sources :

Example 6 with SofaMethod

use of com.alipay.sofa.runtime.api.annotation.SofaMethod in project sofa-boot by sofastack.

the class RpcBindingConverter method parseSofaMethods.

public List<RpcBindingMethodInfo> parseSofaMethods(SofaMethod[] sofaMethods) {
    List<RpcBindingMethodInfo> rpcBindingMethodInfos = new ArrayList<RpcBindingMethodInfo>();
    for (SofaMethod sofaMethod : sofaMethods) {
        RpcBindingMethodInfo rpcBindingMethodInfo = new RpcBindingMethodInfo();
        rpcBindingMethodInfo.setName(sofaMethod.name());
        rpcBindingMethodInfo.setType(sofaMethod.invokeType());
        rpcBindingMethodInfo.setTimeout(sofaMethod.timeout());
        rpcBindingMethodInfo.setRetries(sofaMethod.retries());
        rpcBindingMethodInfo.setCallbackClass(sofaMethod.callbackClass());
        rpcBindingMethodInfo.setCallbackRef(sofaMethod.callbackRef());
        rpcBindingMethodInfos.add(rpcBindingMethodInfo);
    }
    return rpcBindingMethodInfos;
}
Also used : SofaMethod(com.alipay.sofa.runtime.api.annotation.SofaMethod) ArrayList(java.util.ArrayList) RpcBindingMethodInfo(com.alipay.sofa.rpc.boot.runtime.binding.RpcBindingMethodInfo)

Aggregations

SofaMethod (com.alipay.sofa.runtime.api.annotation.SofaMethod)6 ArrayList (java.util.ArrayList)6 SofaBootRpcRuntimeException (com.alipay.sofa.rpc.boot.common.SofaBootRpcRuntimeException)4 ExcludeFilter (com.alipay.sofa.rpc.filter.ExcludeFilter)4 Filter (com.alipay.sofa.rpc.filter.Filter)4 SofaParameter (com.alipay.sofa.runtime.api.annotation.SofaParameter)4 ApplicationContext (org.springframework.context.ApplicationContext)4 RpcBindingMethodInfo (com.alipay.sofa.rpc.boot.runtime.binding.RpcBindingMethodInfo)2 UserThreadPool (com.alipay.sofa.rpc.server.UserThreadPool)2