org.apache.james.util.watchdog
Class ThreadPerWatchdogFactory

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.util.watchdog.ThreadPerWatchdogFactory
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, WatchdogFactory

public class ThreadPerWatchdogFactory
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements WatchdogFactory

This class is a factory to produce Watchdogs, each of which is associated with a single thread.


Constructor Summary
ThreadPerWatchdogFactory(org.apache.excalibur.thread.ThreadPool theThreadPool, long timeout)
          Creates the factory and sets the thread pool used to generate InaccurateTimeoutWatchdogs.
 
Method Summary
 Watchdog getWatchdog(WatchdogTarget theTarget)
          Gets a Watchdog
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPerWatchdogFactory

public ThreadPerWatchdogFactory(org.apache.excalibur.thread.ThreadPool theThreadPool,
                                long timeout)
Creates the factory and sets the thread pool used to generate InaccurateTimeoutWatchdogs.

Method Detail

getWatchdog

public Watchdog getWatchdog(WatchdogTarget theTarget)
                     throws java.lang.Exception
Description copied from interface: WatchdogFactory
Gets a Watchdog

Specified by:
getWatchdog in interface WatchdogFactory
Parameters:
theTarget - the WatchdogTarget to be triggered upon expiration
Throws:
java.lang.Exception
See Also:
WatchdogFactory.getWatchdog(WatchdogTarget)


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.