soap tutorial

adriani.jws.template.util
Class GeneralThread

java.lang.Object
  extended by adriani.jws.template.util.GeneralThread
Direct Known Subclasses:
RotateThread

public abstract class GeneralThread
extends java.lang.Object

The parent class for all the Thread classes used by this project. For the time being this class is used only by the RotateThread class.


Field Summary
 boolean active
          If false no operation is performed during the main "run-cycle".
 boolean running
          If false the wrapped Thread exits from the endless loop and stops.
 java.lang.Thread theThread
          The Thread wrapped by this class.
 
Constructor Summary
GeneralThread()
           
 
Method Summary
 void delay(long time)
          Stops this thread for few milliseconds.
 boolean isActive()
          Specifies if this thread is ACTIVE (i.e. if it's set to perform his duty).
 boolean isRunning()
          Specifies if this thread is RUNNING (i.e. if it's still running the While loop).
 void setActive(boolean value)
          Specifies if this thread must perform his duty.
 void stopCycle()
          Stop the endless while loop contained in the run() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theThread

public java.lang.Thread theThread
The Thread wrapped by this class.


active

public boolean active
If false no operation is performed during the main "run-cycle".


running

public boolean running
If false the wrapped Thread exits from the endless loop and stops.

Constructor Detail

GeneralThread

public GeneralThread()
Method Detail

setActive

public void setActive(boolean value)
Specifies if this thread must perform his duty. If set to false the thread continues to cycle his endless loop, but does NOT execute the task within the endless loop.

Parameters:
value - if false no operation is performed during the main run cycle

stopCycle

public void stopCycle()
Stop the endless while loop contained in the run() method. This will terminate execution of the run() method.


isActive

public boolean isActive()
Specifies if this thread is ACTIVE (i.e. if it's set to perform his duty).

Returns:
true if this thread is active

isRunning

public boolean isRunning()
Specifies if this thread is RUNNING (i.e. if it's still running the While loop). If this method return false then the endless loop is terminated and the run() has finished execution.

Returns:
true if this thread is running

delay

public void delay(long time)
Stops this thread for few milliseconds.

Parameters:
time - the time (in milliseconds) that this thread must be stopped

Build 19/03/2014

Morpheus Technologies - making the Zion software
Copyright © 2009-2014 Morpheus Technologies. All Rights Reserved