net.spy.cron
Class FileJobQueue

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by net.spy.cron.JobQueue<MainJob>
                  extended by net.spy.cron.FileJobQueue
All Implemented Interfaces:
Serializable, Cloneable, Iterable<MainJob>, Collection<MainJob>, List<MainJob>, RandomAccess

public class FileJobQueue
extends JobQueue<MainJob>

Get a job queue as defined in a file. The file will be in one the following formats:

There are also special times that may be provided for less specific start times: In a case where fields are not provided, the current time will be substituted.

For example:

 20010403-090000 DAY 1 net.spy.pagermusic.RunSubs
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FileJobQueue(ClassLoader cl, File f)
          Get a new FileJobQueue based on what's in the given file.
FileJobQueue(ClassLoader cl, Reader r)
          Get a new FileJobQueue from a Reader.
FileJobQueue(File f)
          Get a FileJobQueue from a file using the current classloader.
FileJobQueue(Reader r)
          Get a FileJobQueue from a reader using the current classloader.
 
Method Summary
 
Methods inherited from class net.spy.cron.JobQueue
addJob, getLogger, getNextStartDate, getReadyJobs
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

FileJobQueue

public FileJobQueue(ClassLoader cl,
                    File f)
             throws IOException
Get a new FileJobQueue based on what's in the given file.

Parameters:
cl - the class loader
f - the file to read
Throws:
IOException - if there's a problem reading the jobs

FileJobQueue

public FileJobQueue(File f)
             throws IOException
Get a FileJobQueue from a file using the current classloader.

Parameters:
f - the file
Throws:
IOException

FileJobQueue

public FileJobQueue(ClassLoader cl,
                    Reader r)
             throws IOException
Get a new FileJobQueue from a Reader.

Parameters:
cl - the classloader
r - the reader
Throws:
IOException - if there's a problem reading the jobs

FileJobQueue

public FileJobQueue(Reader r)
             throws IOException
Get a FileJobQueue from a reader using the current classloader.

Parameters:
r - the reader
Throws:
IOException


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.