public Object invoke(Invocation mi) throws Exception { final boolean remoteInvocation = mi instanceof MarshalledInvocation; if(remoteInvocation) { ((MarshalledInvocation)mi).setMethodMap(methodMap); } final Object result; if(invokeTargetMethod) { String signature[] = (String[])signatureMap.get(mi.getMethod()); result = server.invoke(targetName, mi.getMethod().getName(), mi.getArguments(), signature); } else { result = server.invoke(targetName, "invoke", new Object[]{mi}, Invocation.INVOKE_SIGNATURE); } return result; }
public RMIResponse invoke(MarshalledInvocation mi) throws Exception { mi.setMethodMap(invokerMap); Method method = mi.getMethod(); RMIResponse rsp = new RMIResponse(); rsp.response = method.invoke(handler, mi.getArguments()); return rsp; }
mi.setMethodMap(this.marshalledInvocationMapping);
mi.setMethodMap(marshalledInvocationMapping);
public Object invoke(Invocation invocation) throws Exception { Object result = null; if(invocation instanceof MarshalledInvocation){ MarshalledInvocation mi = (MarshalledInvocation)invocation; mi.setMethodMap(marshalledInvocationMapping); } final Method targetMethod = invocation.getMethod(); final Class targetClass = targetMethod.getDeclaringClass(); final Object[] targetArguments = invocation.getArguments(); final Object retVal = internalInvoke(targetClass, targetMethod, targetArguments, invocation.getId()); if(!(retVal instanceof Serializable) && retVal != null){ log.debug("Creating proxy for instance " + retVal); result = createProxy(retVal); } return result; }
mi.setMethodMap(marshalledInvocationMapping);
mi.setMethodMap(marshalledInvocationMapping);
public HARMIResponse invoke(long clientViewId, MarshalledInvocation mi) throws Exception { mi.setMethodMap(invokerMap); Method method = mi.getMethod(); try { HARMIResponse rsp = new HARMIResponse(); if (clientViewId != target.getCurrentViewId()) { rsp.newReplicants = new ArrayList<Object>(target.getReplicantList()); rsp.currentViewId = target.getCurrentViewId(); } rsp.response = method.invoke(handler, mi.getArguments()); return rsp; } catch (IllegalAccessException iae) { throw iae; } catch (IllegalArgumentException iae) { throw iae; } catch (java.lang.reflect.InvocationTargetException ite) { throw (Exception)ite.getTargetException(); } }
mi.setMethodMap(marshalledInvocationMapping);
((MarshalledInvocation)mi).setMethodMap(marshalledInvocationMapping); ((MarshalledInvocation)mi).setMethodMap(marshalledInvocationMapping);