|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 | |
protected static org.apache.log4j.Logger |
componentLogger
|
protected short |
priority
|
protected Shortcut |
shortcut
|
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)
|
|
MethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments,
MethodCallMetadata metadata)
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()
|
java.util.LinkedList |
getBarrierTags()
Get the tags for barrier to the method call (by copy) |
java.lang.String |
getComponentInterfaceName()
accessor for the name ot the invoked Fractal interface |
static MethodCall |
getComponentMethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments,
java.lang.String interfaceName,
boolean isFunctional)
|
static MethodCall |
getComponentMethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments,
java.lang.String interfaceName,
boolean isFunctional,
short priority)
Returns a MethodCall object with extra info for component calls (the possible name of the functional interface invoked). |
MethodCallMetadata |
getMetadata()
|
static MethodCall |
getMethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments)
|
static MethodCall |
getMethodCall(java.lang.reflect.Method reifiedMethod,
java.lang.Object[] effectiveArguments,
MethodCallMetadata metadata)
Factory method for getting MethodCall objects |
java.lang.String |
getName()
Returns the name of the method |
int |
getNumberOfParameter()
|
java.lang.Object |
getParameter(int index)
|
java.lang.Object[] |
getParameters()
|
short |
getPriority()
|
static boolean |
getRecycleMethodCallObject()
Indicates if the recycling of MethodCall objects is currently running or not. |
java.lang.reflect.Method |
getReifiedMethod()
|
Shortcut |
getShortcut()
|
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 |
isComponentControllerMethodCall()
|
boolean |
isComponentMethodCall()
|
boolean |
isComponentMethodCallOnComponent()
|
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 |
setBarrierTags(java.util.LinkedList barrierTags)
Set the tags for barrier to the method call (by copy) |
void |
setComponentInterfaceName(java.lang.String string)
setter for the functional name of the invoked Fractal interface |
void |
setEffectiveArguments(java.lang.Object[] o)
|
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 |
shortcutNotification(UniversalBody sender,
UniversalBody intermediate)
|
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 |
protected static org.apache.log4j.Logger componentLogger
protected Shortcut shortcut
protected short priority
Constructor Detail |
public MethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments, MethodCallMetadata metadata)
getMethodCall
instead of build a new MethodCall object.
public MethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments)
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, MethodCallMetadata metadata)
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 getMethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments)
public static MethodCall getComponentMethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments, java.lang.String interfaceName, boolean isFunctional, short priority)
reifiedMethod
- effectiveArguments
- interfaceName
- fractal interface namepriority
- default is to 3 (strict FIFO)
public static MethodCall getComponentMethodCall(java.lang.reflect.Method reifiedMethod, java.lang.Object[] effectiveArguments, java.lang.String interfaceName, boolean isFunctional)
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 reflection 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()
public java.lang.reflect.Method getReifiedMethod()
public java.lang.String getName()
public int getNumberOfParameter()
public java.lang.Object getParameter(int index)
public java.lang.Object[] getParameters()
public void setEffectiveArguments(java.lang.Object[] o)
public void makeDeepCopyOfArguments() throws java.io.IOException
java.io.IOException
public java.lang.String getComponentInterfaceName()
public void setComponentInterfaceName(java.lang.String string)
string
- the functional name of the invoked Fractal interfaceprotected 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 :
public void setBarrierTags(java.util.LinkedList barrierTags)
barrierTags
- the list of tagspublic java.util.LinkedList getBarrierTags()
public MethodCallMetadata getMetadata()
public Shortcut getShortcut()
public void shortcutNotification(UniversalBody sender, UniversalBody intermediate)
public boolean isComponentMethodCall()
public boolean isComponentControllerMethodCall()
public boolean isComponentMethodCallOnComponent()
public short getPriority()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |