Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.services.util

Class SuspendableThread

com.gentleware.services.util.SuspendableThread

public class SuspendableThread


This class defines a thread that is suspendalbe and resumable. The real action of this thread will take place in doThreadAction(). Subclasses should overwrite this operation in order to do real work.
Since:
2.2


 Attribute Summary
public static int  STOP_EXECUTION_TIMEOUT
 
private boolean  _shouldStop
 
private int  _sleepTime
 
private boolean  _suspendCommandExecution
 
arrow_up
 

 Constructor Summary
public   SuspendableThread()
 
public   SuspendableThread(String name)
 
arrow_up
 

 Method Summary
protected void   doThreadAction()
 
protected void   doThreadCatchException(Exception e)
 
public boolean   isSuspended()
 
public void   resumeExecution()
 
public void   run()
 
public boolean   setSleepTime(int sleepTime)
Sets the sleep time of this thread, i.e. 
public void   startExecution()
 
public void   stopExecution()
 
public void   suspendExecution()
 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 15
gentleware-imported-package-statement-line-number 5
 

 Attribute Detail

STOP_EXECUTION_TIMEOUT

public static int STOP_EXECUTION_TIMEOUT

arrow_up


_shouldStop

private boolean _shouldStop

arrow_up


_sleepTime

private int _sleepTime

arrow_up


_suspendCommandExecution

private boolean _suspendCommandExecution

arrow_up
 Constructor Detail

SuspendableThread

public com.gentleware.services.util.SuspendableThread SuspendableThread()

Returns:
arrow_up


SuspendableThread

public com.gentleware.services.util.SuspendableThread SuspendableThread(String name)

Parameters:
name -
Returns:
arrow_up
 Method Detail

doThreadAction

protected void doThreadAction()

arrow_up


doThreadCatchException

protected void doThreadCatchException(Exception e)

Parameters:
e -
arrow_up


isSuspended

public boolean isSuspended()

Returns:
arrow_up


resumeExecution

public void resumeExecution()

arrow_up


run

public void run()

arrow_up


setSleepTime

public boolean setSleepTime(int sleepTime)


Sets the sleep time of this thread, i.e. the time this thread will sleep between loop runs. The sleep time can only be set before start() is called on the thread.  
Parameters:
sleepTime - The time in milliseconds this thread will sleep.
Returns:
True, if sleep time could be set
arrow_up


startExecution

public void startExecution()

arrow_up


stopExecution

public void stopExecution()

arrow_up


suspendExecution

public void suspendExecution()

arrow_up
Created  2004 - 12 - 1

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.