SmartFrog 3.10.000

org.smartfrog.sfcore.common
Class TerminatorThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.smartfrog.sfcore.common.TerminatorThread
All Implemented Interfaces:
java.lang.Runnable

public class TerminatorThread
extends java.lang.Thread

TerminatorThread is used by components for asynchronous termination. Caller component should create the object and then call method start() to start this thread. Example: TerminatorThread terminator = new TerminatorThread(targetComponent, excp, componentId).quietly(); // start the thead terminator.start();


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TerminatorThread(Prim target, TerminationRecord record)
          Constructs the TerminatorThread object using the component reference and termination record.
TerminatorThread(Prim target, java.lang.Throwable t, Reference compId)
          Constructs the TerminatorThread object using the component reference, the exception object component identifier.
 
Method Summary
 TerminatorThread detach()
          Utility method to detach TerminatorThread object from parent.
 TerminatorThread dontTerminate()
          Utility method that does not terminates the TerminatorThread object.
 TerminatorThread quietly()
          Utility method to create/terminate the TerminatorThread object quietly.
 void run()
          Run method used to trigger the terminatation of the component.
 
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

TerminatorThread

public TerminatorThread(Prim target,
                        TerminationRecord record)
Constructs the TerminatorThread object using the component reference and termination record.

Parameters:
target - of the component that has to be terminated.
record - record why the termination

TerminatorThread

public TerminatorThread(Prim target,
                        java.lang.Throwable t,
                        Reference compId)
Constructs the TerminatorThread object using the component reference, the exception object component identifier.

Parameters:
target - of the component that has to be terminated.
t - exception that caused the termination
compId - component identifier
Method Detail

quietly

public TerminatorThread quietly()
Utility method to create/terminate the TerminatorThread object quietly.

Returns:
TerminatorThread object

detach

public TerminatorThread detach()
Utility method to detach TerminatorThread object from parent.

Returns:
TerminatorThread object

dontTerminate

public TerminatorThread dontTerminate()
Utility method that does not terminates the TerminatorThread object.

Returns:
TerminatorThread object

run

public void run()
Run method used to trigger the terminatation of the component.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP