- Preconditions.checkArgument(rpcService != null, "Rpc Service needs to be specied.");
- @SuppressWarnings("unchecked")
- final
- T proxy = (T) proxies.getUnchecked(rpcService).getProxy();
- return proxy;
- }
-
- private RpcServiceAdapter createProxy(final Class<? extends RpcService> key) {
- Preconditions.checkArgument(BindingReflections.isBindingClass(key));
- Preconditions.checkArgument(key.isInterface(), "Supplied RPC service type must be interface.");
- return new RpcServiceAdapter(key, codec, domService);
+ checkArgument(rpcService != null, "Rpc Service needs to be specied.");
+ return (T) proxies.getUnchecked(rpcService).getProxy();