@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { return new RemoteInvocation(methodInvocation); }
@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { return new RemoteInvocation(methodInvocation); }
RemoteInvocation ri = new RemoteInvocation(mi); if (sessionId != null) { ri.addAttribute(SESSION_ID_KEY, sessionId);
@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { RemoteInvocation invocation; /* package was renamed to 'org.apache.dubbo' in v2.7.0, so only provider versions after v2.7.0 can recognize org.apache.xxx.HttpRemoteInvocation'. */ if (Version.isRelease270OrHigher(url.getParameter(Constants.RELEASE_KEY))) { invocation = new HttpRemoteInvocation(methodInvocation); } else { /* The customized 'com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation' was firstly introduced in v2.6.3. The main purpose is to support transformation of attachments in HttpProtocol, see https://github.com/apache/incubator-dubbo/pull/1827. To guarantee interoperability with lower versions, we need to check if the provider is v2.6.3 or higher before sending customized HttpRemoteInvocation. */ if (Version.isRelease263OrHigher(url.getParameter(Constants.DUBBO_VERSION_KEY))) { invocation = new com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation(methodInvocation); } else { invocation = new RemoteInvocation(methodInvocation); } } if (isGeneric) { invocation.addAttribute(Constants.GENERIC_KEY, generic); } return invocation; } });
@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { RemoteInvocation invocation; /* package was renamed to 'org.apache.dubbo' in v2.7.0, so only provider versions after v2.7.0 can recognize org.apache.xxx.HttpRemoteInvocation'. */ if (Version.isRelease270OrHigher(url.getParameter(Constants.RELEASE_KEY))) { invocation = new HttpRemoteInvocation(methodInvocation); } else { /* The customized 'com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation' was firstly introduced in v2.6.3. The main purpose is to support transformation of attachments in HttpProtocol, see https://github.com/apache/incubator-dubbo/pull/1827. To guarantee interoperability with lower versions, we need to check if the provider is v2.6.3 or higher before sending customized HttpRemoteInvocation. */ if (Version.isRelease263OrHigher(url.getParameter(Constants.DUBBO_VERSION_KEY))) { invocation = new com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation(methodInvocation); } else { invocation = new RemoteInvocation(methodInvocation); } } if (isGeneric) { invocation.addAttribute(Constants.GENERIC_KEY, generic); } return invocation; } });
@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { RemoteInvocation invocation = new RemoteInvocation(methodInvocation); invocation.addAttribute("myKey", "myValue"); try { invocation.addAttribute("myKey", "myValue"); fail("Should have thrown IllegalStateException"); } catch (IllegalStateException ex) { // expected: already defined } assertNotNull(invocation.getAttributes()); assertEquals(1, invocation.getAttributes().size()); assertEquals("myValue", invocation.getAttributes().get("myKey")); assertEquals("myValue", invocation.getAttribute("myKey")); return invocation; } });
RemoteInvocation inv = new RemoteInvocation(mi); inv = new RemoteInvocation(); inv.setArguments(new Object[] { "bla" }); assertEquals("bla", inv.getArguments()[0]); assertEquals(String.class, inv.getParameterTypes()[0]); inv = new RemoteInvocation("setName", new Class<?>[] {String.class}, new Object[] {"bla"}); assertEquals("bla", inv.getArguments()[0]); assertEquals("setName", inv.getMethodName());
@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { return new RemoteInvocation(methodInvocation); }
logger.debug("call notify Mode proxy = " + rrm.getHost() + "; " + rrm.getPort()); if (proxy instanceof RmiInvocationHandler) { RemoteInvocation invocation = new RemoteInvocation(remoteMethod.getName(), remoteMethod.getParameterTypes(), (Object[]) payload); Method method = proxy.getClass().getMethod(WRAPPED_METHOD_NAME, new Class[] { RemoteInvocation.class }); obj = method.invoke(proxy, invocation);
RemoteInvocation invocation = new RemoteInvocation(remoteMethod.getName(), remoteMethod.getParameterTypes(), (Object[]) payload); Method method = proxy.getClass().getMethod(WRAPPED_METHOD_NAME, new Class[] { RemoteInvocation.class }); obj = method.invoke(proxy, invocation);
RemoteInvocation ri = new RemoteInvocation(mi); if (sessionId != null) { ri.addAttribute(SESSION_ID_KEY, sessionId);
@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { RemoteInvocation invocation; /* package was renamed to 'org.apache.dubbo' in v2.7.0, so only provider versions after v2.7.0 can recognize org.apache.xxx.HttpRemoteInvocation'. */ if (Version.isRelease270OrHigher(url.getParameter(Constants.RELEASE_KEY))) { invocation = new HttpRemoteInvocation(methodInvocation); } else { /* The customized 'com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation' was firstly introduced in v2.6.3. The main purpose is to support transformation of attachments in HttpProtocol, see https://github.com/apache/incubator-dubbo/pull/1827. To guarantee interoperability with lower versions, we need to check if the provider is v2.6.3 or higher before sending customized HttpRemoteInvocation. */ if (Version.isRelease263OrHigher(url.getParameter(Constants.DUBBO_VERSION_KEY))) { invocation = new com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation(methodInvocation); } else { invocation = new RemoteInvocation(methodInvocation); } } if (isGeneric) { invocation.addAttribute(Constants.GENERIC_KEY, generic); } return invocation; } });
@Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { RemoteInvocation invocation; /* package was renamed to 'org.apache.dubbo' in v2.7.0, so only provider versions after v2.7.0 can recognize org.apache.xxx.HttpRemoteInvocation'. */ if (Version.isRelease270OrHigher(url.getParameter(Constants.RELEASE_KEY))) { invocation = new HttpRemoteInvocation(methodInvocation); } else { /* The customized 'com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation' was firstly introduced in v2.6.3. The main purpose is to support transformation of attachments in HttpProtocol, see https://github.com/apache/incubator-dubbo/pull/1827. To guarantee interoperability with lower versions, we need to check if the provider is v2.6.3 or higher before sending customized HttpRemoteInvocation. */ if (Version.isRelease263OrHigher(url.getParameter(Constants.DUBBO_VERSION_KEY))) { invocation = new com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation(methodInvocation); } else { invocation = new RemoteInvocation(methodInvocation); } } if (isGeneric) { invocation.addAttribute(Constants.GENERIC_KEY, generic); } return invocation; } });