| java.lang.Object org.apache.james.util.watchdog.SchedulerWatchdogFactory
SchedulerWatchdogFactory | public class SchedulerWatchdogFactory implements WatchdogFactory(Code) | | This class is a factory to produce Watchdogs, each of which is associated
with a single TimeScheduler Target and a TimeScheduler object.
This could be used in James by adding a server configuration
parameter:
schedulerWatchdogs = conf.getChild("useSchedulerWatchdogs").getValueAsBoolean(false);
getting the TimeScheduler component:
scheduler = (TimeScheduler) compMgr.lookup(TimeScheduler.ROLE);
and changing AbstractJamesService.getWatchdogFactory to look
something like:
protected WatchdogFactory getWatchdogFactory() {
WatchdogFactory theWatchdogFactory = null;
if (schedulerWatchdogs) {
theWatchdogFactory = new SchedulerWatchdogFactory(scheduler, timeout);
} else {
theWatchdogFactory = new ThreadPerWatchdogFactory(threadPool, timeout);
}
if (theWatchdogFactory instanceof LogEnabled) {
((LogEnabled)theWatchdogFactory).enableLogging(getLogger());
}
return theWatchdogFactory;
}
|
Constructor Summary | |
public | SchedulerWatchdogFactory(TimeScheduler theTimeScheduler, long timeout) Creates the factory and sets the TimeScheduler used to implement
the watchdogs. |
SchedulerWatchdogFactory | public SchedulerWatchdogFactory(TimeScheduler theTimeScheduler, long timeout)(Code) | | Creates the factory and sets the TimeScheduler used to implement
the watchdogs.
Parameters: theTimeScheduler - the scheduler that manages Watchdog triggeringfor Watchdogs produced by this factory Parameters: timeout - the timeout for Watchdogs produced by this factory |
|
|