|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.objectweb.jac.aspects.gui.InvokeThread
This class allows the programmer to invoke a given method in a new thread.
JAC programmers should use JAC to pass some attibutes of the current thread to the new thread.
Typical use:
InvokeThread.run( myObject, "myMethodName", new Object[] { arg0, ...}, new String[] { attrName0, ... }, new Object[] { attrValue0, ... }, new String[] { lattrName0, ... }, new Object[] { lattrValue0, ... } );
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
InvokeThread(Object object,
AbstractMethodItem method,
Object[] parameters)
Creates a new thread that will invoke a method when started. |
|
InvokeThread(Object object,
AbstractMethodItem method,
Object[] parameters,
String[] attrNames,
Object[] attrValues,
String[] lattrNames,
Object[] lattrValues)
|
Method Summary | |
static InvokeThread |
quietRun(Object object,
AbstractMethodItem method,
Object[] parameters,
String[] attrNames,
Object[] attrValues,
String[] lattrNames,
Object[] lattrValues)
Runs a method in a new thread and sets a display for this thread. |
void |
run()
Runs the thread (and invoke the method that was given to the constructor with the right display in the collaboration). |
static InvokeThread |
run(Object object,
AbstractMethodItem method,
Object[] parameters)
Runs a method in a new thread. |
static InvokeThread |
run(Object object,
AbstractMethodItem method,
Object[] parameters,
String[] attrNames,
Object[] attrValues,
String[] lattrNames,
Object[] lattrValues)
Runs a method in a new thread and sets a display for this thread. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public InvokeThread(Object object, AbstractMethodItem method, Object[] parameters)
The programmer should use the static run
methods.
object
- the object that contains the method to invokemethod
- the method to invoke when startedparameters
- the parameters to pass to the methodpublic InvokeThread(Object object, AbstractMethodItem method, Object[] parameters, String[] attrNames, Object[] attrValues, String[] lattrNames, Object[] lattrValues)
Method Detail |
public static InvokeThread run(Object object, AbstractMethodItem method, Object[] parameters, String[] attrNames, Object[] attrValues, String[] lattrNames, Object[] lattrValues)
object
- the object that contains the method to callmethod
- the method to callparameters
- the parameters to pass to the methodattrNames
- the attribute names to set into the new thread
collaborationattrValues
- the values of these attributeslattrNames
- the local attribute names to set into the new
thread collaborationlattrValues
- the values of these local attributespublic static InvokeThread quietRun(Object object, AbstractMethodItem method, Object[] parameters, String[] attrNames, Object[] attrValues, String[] lattrNames, Object[] lattrValues)
object
- the object that contains the method to callmethod
- the method to callparameters
- the parameters to pass to the methodattrNames
- the attribute names to set into the new thread
collaborationattrValues
- the values of these attributeslattrNames
- the local attribute names to set into the new
thread collaborationlattrValues
- the values of these local attributespublic static InvokeThread run(Object object, AbstractMethodItem method, Object[] parameters)
object
- the object that contains the method to callmethod
- the method to callparameters
- the parameters to pass to the methodpublic void run()
Do not call this method directly.
run
in interface Runnable
run
in class Thread
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |