public Object invoke(Object target, Object[] args) throws Exception { if(args != null) this.args=args; return invoke(target); }
converted_args[i]=Util.convert(args[i], types[i]); Object retval=call.invoke(target, converted_args); if(retval != null) map.put(prot_name + "." + method_name, retval.toString());
/** * Message contains MethodCall. Execute it against *this* object and return result. * Use MethodCall.invoke() to do this. Return result. */ public Object handle(Message req) throws Exception { if(server_obj == null) { log.error(Util.getMessage("NoMethodHandlerIsRegisteredDiscardingRequest")); return null; } if(req == null || req.getLength() == 0) { log.error(Util.getMessage("MessageOrMessageBufferIsNull")); return null; } MethodCall method_call=methodCallFromBuffer(req.getRawBuffer(), req.getOffset(), req.getLength(), marshaller); if(log.isTraceEnabled()) log.trace("[sender=%s], method_call: %s", req.getSrc(), method_call); if(method_call.mode() == MethodCall.ID) { if(method_lookup == null) throw new Exception(String.format("MethodCall uses ID=%d, but method_lookup has not been set", method_call.methodId())); Method m=method_lookup.findMethod(method_call.methodId()); if(m == null) throw new Exception("no method found for " + method_call.methodId()); method_call.method(m); } return method_call.invoke(server_obj); }
public Object invoke(Object target, Object[] args) throws Throwable { if(args != null) this.args=args; return invoke(target); }
public Object invoke(Object target, Object[] args) throws Exception { if(args != null) this.args=args; return invoke(target); }
@SuppressWarnings("unchecked") <T> T invokeDirectly(String serviceName, String methodName, Object[] args, Class<?>[] types, List<T> remoteResponses, ResponseFilter filter) throws Exception { T retVal = null; Object handler = this.rpcHandlers.get(serviceName); if (handler != null) { MethodCall call = new MethodCall(methodName, args, types); try { Object result = call.invoke(handler); retVal = (T) result; if (remoteResponses != null && (filter == null || filter.isAcceptable(retVal, me))) { remoteResponses.add(retVal); } } catch (Exception e) { throw e; } catch (Error e) { throw e; } catch (Throwable e) { throw new RuntimeException(e); } } return retVal; }
try Object result = call.invoke(handler); if (returnType != null && void.class != returnType)
converted_args[i]=Util.convert(args[i], types[i]); Object retval=call.invoke(target, converted_args); if(retval != null) map.put(prot_name + "." + method_name, retval.toString());
return method_call.invoke(server_obj);
/** * Message contains MethodCall. Execute it against *this* object and return result. * Use MethodCall.invoke() to do this. Return result. */ public Object handle(Message req) throws Exception { if(server_obj == null) { log.error(Util.getMessage("NoMethodHandlerIsRegisteredDiscardingRequest")); return null; } if(req == null || req.getLength() == 0) { log.error(Util.getMessage("MessageOrMessageBufferIsNull")); return null; } MethodCall method_call=methodCallFromBuffer(req.getRawBuffer(), req.getOffset(), req.getLength(), marshaller); if(log.isTraceEnabled()) log.trace("[sender=%s], method_call: %s", req.getSrc(), method_call); if(method_call.mode() == MethodCall.ID) { if(method_lookup == null) throw new Exception(String.format("MethodCall uses ID=%d, but method_lookup has not been set", method_call.methodId())); Method m=method_lookup.findMethod(method_call.methodId()); if(m == null) throw new Exception("no method found for " + method_call.methodId()); method_call.method(m); } return method_call.invoke(server_obj); }
retval = method_call.invoke(handler); if (overrideCL)
retval = method_call.invoke(handler); if (trace) { ClusteringImplLogger.ROOT_LOGGER.tracef("rpc call return value: %s", retval);