net.sourceforge.rssowl.controller.thread
Class ExtendedThread

java.lang.Object
  extended byjava.lang.Thread
      extended bynet.sourceforge.rssowl.controller.thread.ExtendedThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
FeedLoader, FeedValidator

public class ExtendedThread
extends Thread

This simple extension of the Thread class uses a boolean flag to indicate wether it was stopped or not. This avoids the need of using the stop() method

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
protected  boolean stopped
          Flag indicating status of the Thread
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ExtendedThread()
          Instantiate a new Extended Thread
ExtendedThread(String name)
          Instantiate a new Extended Thread
 
Method Summary
 boolean isStopped()
          Check if this Thread was stopped
 void startThread()
          Starts this Thread
 void stopThread()
          Stops this Thread by setting the stopped-flag to TRUE
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, 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
 

Field Detail

stopped

protected boolean stopped
Flag indicating status of the Thread

Constructor Detail

ExtendedThread

public ExtendedThread()
Instantiate a new Extended Thread

See Also:
Thread

ExtendedThread

public ExtendedThread(String name)
Instantiate a new Extended Thread

Parameters:
name - the name of the new thread.
See Also:
Thread
Method Detail

isStopped

public boolean isStopped()
Check if this Thread was stopped

Returns:
boolean TRUE if stopped

startThread

public void startThread()
Starts this Thread


stopThread

public void stopThread()
Stops this Thread by setting the stopped-flag to TRUE



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo