edu.rit.m2mi
Class ReceiverThread

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

public class ReceiverThread
extends Thread

Class ReceiverThread provides a thread for receiving and processing incoming M2MI invocation messages.

If the M2MI property "edu.rit.m2mi.debug.ReceiverThread" is 1 or higher (see class M2MIProperties), then whenever an exception is thrown while receiving or processing an incoming M2MI invocation message, the receiver thread will print the exception stack trace on the standard error stream. The receiver thread will continue running, however.

If the M2MI property "edu.rit.m2mi.debug.ReceiverThread" is 2 or higher, then the receiver thread will print a message on the standard error stream whenever the receiver thread receives an incoming M2MI invocation message.


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
ReceiverThread(M2MP theM2MPLayer)
          Construct a new receiver thread.
 
Method Summary
 void run()
          Perform this receiver 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

ReceiverThread

public ReceiverThread(M2MP theM2MPLayer)
Construct a new receiver thread. The thread is automatically marked as a daemon thread and started.

Parameters:
theM2MPLayer - M2MP Layer.
Throws:
NullPointerException - (unchecked exception) Thrown if theM2MPLayer is null.
IllegalStateException - (unchecked exception) Thrown if the value of the M2MI property "edu.rit.m2mi.debug.ReceiverThread" cannot be determined.
Method Detail

run

public void run()
Perform this receiver 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.