|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.blocks.MethodCall
A method call is the JavaGroup 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.
Field Summary | |
protected java.lang.Object[] |
args
the arguments of the method |
protected static Log |
log
|
protected java.lang.reflect.Method |
method
the Method of the call |
protected static short |
METHOD
explicitly ship the method, caller has to determine method himself |
protected java.lang.String |
method_name
the name of the method, case sensitive |
protected short |
mode
which mode to use |
protected static short |
OLD
infer the method from the arguments |
protected java.lang.String[] |
signature
the signature, e.g. |
protected static short |
SIGNATURE
provide a signature, similar to JMX |
protected java.lang.Class[] |
types
the class types, e.g. |
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(java.lang.reflect.Method method)
|
|
MethodCall(java.lang.reflect.Method method,
java.lang.Object[] arguments)
|
|
MethodCall(java.lang.String method_name,
java.lang.Object[] args)
Deprecated. Use one of the constructors that take class types as arguments |
|
MethodCall(java.lang.String method_name,
java.lang.Object[] args,
java.lang.Class[] types)
|
|
MethodCall(java.lang.String method_name,
java.lang.Object[] args,
java.lang.String[] signature)
|
Method Summary | |
java.lang.Object[] |
getArgs()
returns an ordered list of arguments used for the method invokation |
java.lang.reflect.Method |
getMethod()
|
int |
getMode()
|
java.lang.String |
getName()
returns the name of the method to be invoked using this method call object |
java.lang.Object |
invoke(java.lang.Object target)
Invokes the method with the supplied arguments against the target object. |
java.lang.Object |
invoke(java.lang.Object target,
java.lang.Object[] args)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
setArgs(java.lang.Object[] args)
|
void |
setName(java.lang.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 |
java.lang.String |
toString()
|
java.lang.String |
toStringDetails()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String method_name
protected java.lang.Object[] args
protected java.lang.Class[] types
protected java.lang.String[] signature
protected java.lang.reflect.Method method
protected static Log log
protected short mode
protected static final short OLD
protected static final short METHOD
protected static final short TYPES
protected static final short SIGNATURE
Constructor Detail |
public MethodCall()
setName()
has been called
public MethodCall(java.lang.reflect.Method method)
public MethodCall(java.lang.reflect.Method method, java.lang.Object[] arguments)
public MethodCall(java.lang.String method_name, java.lang.Object[] args)
method_name
- args
- public MethodCall(java.lang.String method_name, java.lang.Object[] args, java.lang.Class[] types)
public MethodCall(java.lang.String method_name, java.lang.Object[] args, java.lang.String[] signature)
Method Detail |
public int getMode()
public java.lang.String getName()
public void setName(java.lang.String n)
n
- - a case sensitive method namepublic java.lang.Object[] getArgs()
public void setArgs(java.lang.Object[] args)
public java.lang.reflect.Method getMethod()
public java.lang.Object invoke(java.lang.Object target) throws java.lang.Throwable
target
- - the object that you want to invoke the method on
java.lang.Throwable
public java.lang.Object invoke(java.lang.Object target, java.lang.Object[] args) throws java.lang.Throwable
java.lang.Throwable
public java.lang.String toString()
public java.lang.String toStringDetails()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |