org.apache.avalon.cornerstone.threads.tutorial
Class Counter

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.avalon.cornerstone.threads.tutorial.Counter
All Implemented Interfaces:
java.lang.Runnable, org.apache.avalon.framework.logger.LogEnabled

public class Counter
extends java.lang.Thread
implements org.apache.avalon.framework.logger.LogEnabled

A demonstration runnable object that simply logs a countdown sequence.

Author:
Stephen McConnell

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
Counter()
           
 
Method Summary
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
           
protected  org.apache.avalon.framework.logger.Logger getLogger()
           
 void run()
           
 
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

Counter

public Counter()
Method Detail

enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled

getLogger

protected org.apache.avalon.framework.logger.Logger getLogger()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.