We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@SpiMeta(name = "common") public class CommonProxyFactory implements ProxyFactory {
@Override @SuppressWarnings("unchecked") public <T> T getProxy(Class<T> clz, List<Cluster<T>> clusters) { return (T) new RefererCommonHandler(clusters.get(0).getUrl().getPath(), clusters); } @Override @SuppressWarnings("unchecked") public <T> T getProxy(Class<T> clz, URL refUrl, MeshClient meshClient) { return (T) new MeshClientRefererInvocationHandler(refUrl, meshClient); }
}
return (T) new RefererCommonHandler(clusters.get(0).getUrl().getPath(), clusters);
这个地方强制转换是会报错的,是个bug,大家用的时候注意下,这个common的代理是行不通的
The text was updated successfully, but these errors were encountered:
CommonProxyFactory不是使用在动态代理场景的,是用来创建CommonClient或MeshClient,用在调用其他语言RPC或者MotanMesh的场景使用的。
这种场景下Java侧没有其他语言对应的service类,所以不能使用动态代理方式,需要使用client方式请求其他语言的RPC服务
CommonClient的使用方式可以参考Demo中的Motan2RpcClient
MeshClient的使用方式可以参考Demo中的DemoMeshClient
Sorry, something went wrong.
No branches or pull requests
@SpiMeta(name = "common")
public class CommonProxyFactory implements ProxyFactory {
}
return (T) new RefererCommonHandler(clusters.get(0).getUrl().getPath(), clusters);
这个地方强制转换是会报错的,是个bug,大家用的时候注意下,这个common的代理是行不通的
The text was updated successfully, but these errors were encountered: