|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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(InvokeEvent invoke)
Creates a new thread that will invoke a method when started. |
|
InvokeThread(InvokeEvent invoke,
String[] attrNames,
Object[] attrValues,
String[] lattrNames,
Object[] lattrValues)
Creates a new thread that will invoke a method when started. |
Method Summary | |
static InvokeThread |
quietRun(InvokeEvent invoke,
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(InvokeEvent invoke)
Runs a method in a new thread. |
static InvokeThread |
run(InvokeEvent invoke,
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(InvokeEvent invoke)
The programmer should use the static run
methods.
invoke
- the invocation to performpublic InvokeThread(InvokeEvent invoke, String[] attrNames, Object[] attrValues, String[] lattrNames, Object[] lattrValues)
The programmer should use the static run
methods.
invoke
- the invocation to performattrNames
- name of attributes to add to the context
before invoking the method (may be null)attrValues
- values of the attributes (may be null)lattrNames
- name of local attributes to add to the context (may be null)
before invoking the method (may be null)lattrValues
- values of the local attributes (may be null)Method Detail |
public static InvokeThread run(InvokeEvent invoke, String[] attrNames, Object[] attrValues, String[] lattrNames, Object[] lattrValues)
invoke
- the invocation to performattrNames
- 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(InvokeEvent invoke, String[] attrNames, Object[] attrValues, String[] lattrNames, Object[] lattrValues)
invoke
- the invocation to performattrNames
- 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(InvokeEvent invoke)
invoke
- the invocation to performpublic void run()
Do not call this method directly.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |