You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xiangxiuhui (GitHub)" <gi...@apache.org> on 2019/01/29 09:44:16 UTC

[GitHub] [incubator-dubbo] xiangxiuhui commented on issue #3163: 使用泛化调用中如何使用异步



> 应该是可以的,不过我需要验证一下效果,但是需要改造一下GenericService接口。
> 可能将来会长这样:
> 
> ```
> public interface GenericService {
> 
>     Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException;
> 
>     CompletableFuture<Object> $invokeAsync(String method, String[] parameterTypes, Object[] args) throws GenericException;
> }
> ```
 
 oninvoke、onreturn、onthrow 也要支持下 GenericService
例如下面判断:
        final Method onInvokeMethod = (Method) StaticContext.getSystemContext().get(StaticContext.getKey(invoker.getUrl(), invocation.getMethodName(), Constants.ON_INVOKE_METHOD_KEY));
        final Object onInvokeInst = StaticContext.getSystemContext().get(StaticContext.getKey(invoker.getUrl(), invocation.getMethodName(), Constants.ON_INVOKE_INSTANCE_KEY));


[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org