|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.mop.MethodCall
Instances of this class represent method calls performed on reified objects. They are generated by a stub object, whose role is to act as a representative for the reified object.
Nested Class Summary | |
class |
MethodCall.FixWrapper
|
Field Summary | |
static java.lang.String |
COMPONENT_TAG
|
Constructor Summary | |
protected |
MethodCall()
Builds a new MethodCall object. |
|
MethodCall(MethodCall mc)
Builds a new MethodCall object. |
|
MethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments)
Builds a new MethodCall object. |
Method Summary | |
java.lang.Object |
execute(java.lang.Object targetObject)
Executes the instance method call represented by this object. |
protected void |
finalize()
|
static MethodCall |
getComponentMethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments,
java.lang.String fcFunctionalInterfaceName)
Returns a MethodCall object with extra info for component calls (the possible name of the functional interface invoked). |
java.lang.String |
getFcFunctionalInterfaceName()
accessor for the functional name ot the invoked Fractal interface |
static MethodCall |
getMethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments)
Factory method for getting MethodCall objects |
java.lang.String |
getName()
Returns the name of the method |
int |
getNumberOfParameter()
|
java.lang.Object |
getParameter(int index)
|
static boolean |
getRecycleMethodCallObject()
Indicates if the recycling of MethodCall objects is currently running or not. |
java.lang.reflect.Method |
getReifiedMethod()
|
java.lang.String |
getTag()
accessor for the tag of the method call |
boolean |
isAsynchronousWayCall()
Checks if the Call object can be
processed with a future semantics, i-e if its returned object
can be a future object.
|
boolean |
isOneWayCall()
Returns a boolean saying whether the method is one-way or not. |
void |
makeDeepCopyOfArguments()
Make a deep copy of all arguments of the constructor |
protected void |
readTheObject(java.io.ObjectInputStream in)
|
void |
setEffectiveArguments(java.lang.Object[] o)
|
void |
setFcFunctionalInterfaceName(java.lang.String string)
setter for the functional name of the invoked Fractal interface |
static void |
setMethodCall(MethodCall mc)
Tells the recyclying process that the MethodCall object passed as parameter is ready for recycling. |
static void |
setRecycleMethodCallObject(boolean value)
Sets recycling of MethodCall objects on/off. |
void |
setTag(java.lang.String string)
setter for the tag of the method call |
void |
transformEffectiveArgumentsIntoByteArray()
transform the effectiveArguments into a byte[] |
protected void |
writeTheObject(java.io.ObjectOutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String COMPONENT_TAG
Constructor Detail |
public MethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments)
getMethodCall
instead of build a new MethodCall object.
public MethodCall(MethodCall mc)
getMethodCall
instead of build a new MethodCall object.
mc
- - the MethodCall object to copyprotected MethodCall()
Method Detail |
public void transformEffectiveArgumentsIntoByteArray()
public static void setRecycleMethodCallObject(boolean value)
value
- sets the recycling on if true
, otherwise turns it off.public static boolean getRecycleMethodCallObject()
true
if recycling is on, false
otherwisepublic static MethodCall getMethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments)
reifiedMethod
- a Method
object that represents
the method whose invocation is reifiedeffectiveArguments
- the effective arguments of the call. Arguments
that are of primitive type need to be wrapped
within an instance of the corresponding wrapper
class (like java.lang.Integer
for
primitive type int
for example).
reifiedMethod
with arguments effectiveArguments
public static MethodCall getComponentMethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments, java.lang.String fcFunctionalInterfaceName)
reifiedMethod
- effectiveArguments
- fcFunctionalInterfaceName
- fractal interface name, whose value is :
- null if the call is non-functional
- the name of the functional interface otherwise
public static void setMethodCall(MethodCall mc)
public java.lang.Object execute(java.lang.Object targetObject) throws java.lang.reflect.InvocationTargetException, MethodCallExecutionFailedException
targetObject
- the Object the method is called on
void
, then null
is returned. If the method
returned a primitive type, then it is wrapped inside the appropriate
wrapper object.
MethodCallExecutionFailedException
- thrown if the refleciton of the
call failed.
java.lang.reflect.InvocationTargetException
- thrown if the execution of the reified
method terminates abruptly by throwing an exception. The exception
thrown by the execution of the reified method is placed inside the
InvocationTargetException object.protected void finalize()
finalize
in class java.lang.Object
public java.lang.reflect.Method getReifiedMethod()
public java.lang.String getName()
public int getNumberOfParameter()
public java.lang.Object getParameter(int index)
public void setEffectiveArguments(java.lang.Object[] o)
public void makeDeepCopyOfArguments() throws java.io.IOException
java.io.IOException
public java.lang.String getFcFunctionalInterfaceName()
public void setFcFunctionalInterfaceName(java.lang.String string)
public void setTag(java.lang.String string)
public java.lang.String getTag()
protected void writeTheObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
protected void readTheObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public boolean isOneWayCall()
void
as return type
public boolean isAsynchronousWayCall()
Call
object can be
processed with a future semantics, i-e if its returned object
can be a future object.
Two conditions must be met :
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |