org.jgroups.blocks
public class MethodCall extends Object implements Externalizable
Version: $Revision: 1.19 $
Field Summary | |
---|---|
protected Object[] | args The arguments of the method. |
protected static short | ID Use an ID to map to a method |
protected static Log | log |
protected Method | method The Method of the call. |
protected short | method_id The ID of a method, maps to a java.lang.reflect.Method |
protected String | method_name The name of the method, case sensitive. |
protected short | mode Which mode to use. |
protected static short | METHOD Explicitly ship the method, caller has to determine method himself. |
protected static short | OLD Infer the method from the arguments. |
protected Map | payload To carry arbitrary data with a method call, data needs to be serializable if sent across the wire |
protected String[] | signature The signature, e.g., new String[]{String.class.getName(), int.class.getName()}. |
protected static short | SIGNATURE Provide a signature, similar to JMX. |
protected Class[] | types The class types, e.g., new Class[]{String.class, int.class}. |
protected static short | TYPES Use class information. |
Constructor Summary | |
---|---|
MethodCall()
Creates an empty method call, this is always invalid, until
setName() has been called. | |
MethodCall(Method method) | |
MethodCall(Method method, Object[] arguments) | |
MethodCall(String method_name, Object[] args) | |
MethodCall(short method_id, Object[] args) | |
MethodCall(String method_name, Object[] args, Class[] types) | |
MethodCall(String method_name, Object[] args, String[] signature) |
Method Summary | |
---|---|
Object | get(Object key) |
Object[] | getArgs()
returns an ordered list of arguments used for the method invokation |
short | getId() |
Method | getMethod() |
int | getMode() |
String | getName()
returns the name of the method to be invoked using this method call object |
Object | invoke(Object target)
Invokes the method with the supplied arguments against the target object.
|
Object | invoke(Object target, Object[] args) |
Object | put(Object key, Object value) |
void | readExternal(ObjectInput in) |
void | setArgs(Object[] args) |
void | setId(short method_id) |
void | setMethod(Method m) |
void | setName(String n)
sets the name for this MethodCall and allowing you to reuse the same object for
a different method invokation of a different method |
String | toString() |
String | toStringDetails() |
void | writeExternal(ObjectOutput out) |
setName()
has been called.Deprecated: Use one of the constructors that take class types as arguments
Parameters: method_name args
Returns: returns the list of ordered arguments
Returns: a case sensitive name, can be null for an invalid method call
Parameters: target - the object that you want to invoke the method on
Returns: an object
Parameters: n - a case sensitive method name