org.apache.turbine.modules
Class ScheduledJobLoader

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byorg.apache.turbine.modules.GenericLoader
              extended byorg.apache.turbine.modules.ScheduledJobLoader
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class ScheduledJobLoader
extends GenericLoader

ScheduledJobs loader class.

Version:
$Id: ScheduledJobLoader.java 534527 2007-05-02 16:10:59Z tv $
Author:
Dave Bryson, Henning P. Schmiedehausen
See Also:
Serialized Form

Method Summary
 void exec(JobEntry job, java.lang.String name)
          Attempts to load and execute the external ScheduledJob.
 void exec(RunData data, java.lang.String name)
          Attempts to load and execute the external ScheduledJob.
static ScheduledJobLoader getInstance()
          The method through which this class is accessed.
 ScheduledJob getInstance(java.lang.String name)
          Pulls out an instance of the object by name.
 
Methods inherited from class org.apache.turbine.modules.GenericLoader
cache, getBasePackage, reload, setReload
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

exec

public void exec(JobEntry job,
                 java.lang.String name)
          throws java.lang.Exception
Attempts to load and execute the external ScheduledJob.

Parameters:
job - The JobEntry.
name - Name of object that will execute the job.
Throws:
java.lang.Exception - a generic exception.

exec

public void exec(RunData data,
                 java.lang.String name)
          throws java.lang.Exception
Attempts to load and execute the external ScheduledJob. HELP! - THIS IS UGLY! I want the cache stuff from GenericLoader, BUT, I don't think the scheduler needs the Rundata object. The scheduler runs independently of an HTTP request. This should not extend GenericLoader! Thoughts??

Specified by:
exec in class GenericLoader
Parameters:
data - Turbine information.
name - Name of object that will execute the job.
Throws:
java.lang.Exception - a generic exception.

getInstance

public ScheduledJob getInstance(java.lang.String name)
                         throws java.lang.Exception
Pulls out an instance of the object by name. Name is just the single name of the object.

Parameters:
name - Name of object instance.
Returns:
An ScheduledJob with the specified name, or null.
Throws:
java.lang.Exception - a generic exception.

getInstance

public static ScheduledJobLoader getInstance()
The method through which this class is accessed.

Returns:
The single instance of this class.


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.