edu.rit.m2mi
Class InvocationThread

java.lang.Object
  extended by java.lang.Thread
      extended by edu.rit.m2mi.InvocationThread
All Implemented Interfaces:
Runnable

public class InvocationThread
extends Thread

Class InvocationThread provides a thread for performing M2MI method invocations on target objects. The thread obtains the target objects from an InvocationQueue.

If the M2MI property "edu.rit.m2mi.debug.InvocationThread" is 1 or higher (see class M2MIProperties), then whenever an M2MI target method invocation throws an unchecked exception, the invocation thread will print the exception stack trace on the standard error stream. The invocation thread will continue running, however.


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
InvocationThread(InvocationQueue theQueue)
          Construct a new invocation thread.
 
Method Summary
 void run()
          Perform this invocation thread's processing.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvocationThread

public InvocationThread(InvocationQueue theQueue)
Construct a new invocation thread. The thread is automatically marked as a daemon thread and started.

Parameters:
theQueue - Invocation queue to use.
Throws:
NullPointerException - (unchecked exception) Thrown if theQueue is null.
IllegalStateException - (unchecked exception) Thrown if the value of the M2MI property "edu.rit.m2mi.debug.InvocationThread" cannot be determined.
Method Detail

run

public void run()
Perform this invocation thread's processing.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
Throws:
IllegalStateException - (unchecked exception) Thrown if the thread calling run() is not this thread.


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.