|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.fcrepo.server.utilities.MethodInvokerThread
public class MethodInvokerThread
A Thread that invokes a single method, then exits.
This is convenient in situations where some method should run in a
separate thread, but it is either inconvenient or inappropriate to
write a Runnable to do the work.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
MethodInvokerThread(Object targetObject,
Method method,
Object[] args)
Constructs a MethodInvokerThread. |
|
MethodInvokerThread(Object targetObject,
Method method,
Object[] args,
String name)
Constructs a MethodInvokerThread with a name. |
|
MethodInvokerThread(Object targetObject,
Method method,
Object[] args,
ThreadGroup threadGroup,
String name)
Constructs a MethodInvokerThread with a
ThreadGroup and a name. |
|
| Method Summary | |
|---|---|
Object |
getReturned()
Gets the Object returned by the invoked
Method. |
Throwable |
getThrown()
Gets the Throwable that resulted if an error occurred
while trying to invoke the Method. |
void |
run()
Invokes the Method, then exits. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MethodInvokerThread(Object targetObject,
Method method,
Object[] args)
MethodInvokerThread.
targetObject - The object in which the method resides.method - The Method to invoke.args - The arguments to the method.
public MethodInvokerThread(Object targetObject,
Method method,
Object[] args,
String name)
MethodInvokerThread with a name.
targetObject - The object in which the method resides.method - The Method to invoke.args - The arguments to the method.name - The thread's name.
public MethodInvokerThread(Object targetObject,
Method method,
Object[] args,
ThreadGroup threadGroup,
String name)
MethodInvokerThread with a
ThreadGroup and a name.
targetObject - The object in which the method resides.method - The Method to invoke.args - The arguments to the method.threadGroup - The ThreadGroup to which the thread should belong.name - The thread's name.| Method Detail |
|---|
public void run()
Method, then exits.
run in interface Runnablerun in class Threadpublic Object getReturned()
Object returned by the invoked
Method.
public Throwable getThrown()
Throwable that resulted if an error occurred
while trying to invoke the Method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||