| java.lang.Object org.jgroups.blocks.MethodCall
MethodCall | public class MethodCall implements Externalizable(Code) | | A method call is the JGroups representation of a remote method.
It includes the name of the method (case sensitive) and a list of arguments.
A method call is serializable and can be passed over the wire.
author: Bela Ban version: $Revision: 1.24 $ |
Field Summary | |
final protected static short | ID | final protected static short | METHOD Explicitly ship the method, caller has to determine method himself. | final protected static short | OLD Infer the method from the arguments. | final protected static short | SIGNATURE Provide a signature, similar to JMX. | final protected static short | TYPES Use class information. | protected Object[] | args The arguments of the method. | final protected static Log | log | protected Method | method The Method of the call. | protected short | method_id | protected String | method_name The name of the method, case sensitive. | protected short | mode Which mode to use. | protected Map | payload | protected String[] | signature The signature, e.g., new String[]{String.class.getName(), int.class.getName()}. | protected Class[] | types The class types, e.g., new Class[]{String.class, int.class}. |
ID | final protected static short ID(Code) | | Use an ID to map to a method
|
METHOD | final protected static short METHOD(Code) | | Explicitly ship the method, caller has to determine method himself.
|
OLD | final protected static short OLD(Code) | | Infer the method from the arguments.
|
SIGNATURE | final protected static short SIGNATURE(Code) | | Provide a signature, similar to JMX.
|
TYPES | final protected static short TYPES(Code) | | Use class information.
|
args | protected Object[] args(Code) | | The arguments of the method.
|
log | final protected static Log log(Code) | | |
method_id | protected short method_id(Code) | | The ID of a method, maps to a java.lang.reflect.Method
|
method_name | protected String method_name(Code) | | The name of the method, case sensitive.
|
mode | protected short mode(Code) | | Which mode to use.
|
payload | protected Map payload(Code) | | To carry arbitrary data with a method call, data needs to be serializable if sent across the wire
|
signature | protected String[] signature(Code) | | The signature, e.g., new String[]{String.class.getName(), int.class.getName()}.
|
types | protected Class[] types(Code) | | The class types, e.g., new Class[]{String.class, int.class}.
|
MethodCall | public MethodCall()(Code) | | Creates an empty method call, this is always invalid, until
setName() has been called.
|
MethodCall | public MethodCall(String method_name, Object[] args)(Code) | | Parameters: method_name - Parameters: args - |
MethodCall | public MethodCall(short method_id, Object[] args)(Code) | | |
getAllMethods | Method[] getAllMethods(Class target)(Code) | | The method walks up the class hierarchy and returns all methods of this class
and those inherited from superclasses and superinterfaces.
|
getArgs | public Object[] getArgs()(Code) | | returns an ordered list of arguments used for the method invokation
returns the list of ordered arguments |
getId | public short getId()(Code) | | |
getMethod | Method getMethod(Class target, String methodName, Class[] types)(Code) | | Returns the first method that matches the specified name and parameter types. The overriding
methods have priority. The method is chosen from all the methods of the current class and all
its superclasses and superinterfaces.
the matching method or null if no mathching method has been found. |
getMode | public int getMode()(Code) | | |
getName | public String getName()(Code) | | returns the name of the method to be invoked using this method call object
a case sensitive name, can be null for an invalid method call |
invoke | public Object invoke(Object target) throws Throwable(Code) | | Invokes the method with the supplied arguments against the target object.
If a method lookup is provided, it will be used. Otherwise, the default
method lookup will be used.
Parameters: target - - the object that you want to invoke the method on an object |
setId | public void setId(short method_id)(Code) | | |
setName | public void setName(String n)(Code) | | sets the name for this MethodCall and allowing you to reuse the same object for
a different method invokation of a different method
Parameters: n - - a case sensitive method name |
|
|