com.onionnetworks.antflow.job
Class HotFolderJob

java.lang.Object
  extended bycom.onionnetworks.antflow.job.HotFolderJob
All Implemented Interfaces:
Job
Direct Known Subclasses:
DirectoryHotFolderJob, GroupingHotFolderJob

public abstract class HotFolderJob
extends java.lang.Object
implements Job

Support stuff for invoking a hot folder on a task directory. Some of the code that's in both DirectoryHotFolderJob and GroupingHotFolderJob should be in here, but splitting it out will be a pain.

Author:
Ry4an Brase (ry4an@ry4an.org)

Field Summary
protected static java.lang.String[] DONE_MODES
           
static java.lang.String PARAM_ACCEPT
           
static java.lang.String PARAM_CHECK_HASH
           
static java.lang.String PARAM_DONE_MODE
           
static java.lang.String PARAM_IGNORE_EMPTY
           
static java.lang.String PARAM_INBOX_DIR
           
static java.lang.String PARAM_MAX_FIRE_QUANTITY
           
static java.lang.String PARAM_MIN_AGE
           
static java.lang.String PARAM_PATTERN
           
static java.lang.String PARAM_REJECT
           
static java.lang.String PARAM_THREADS
           
protected  com.onionnetworks.util.InvokingDispatch red
           
protected  java.util.Timer timer
           
 
Fields inherited from interface com.onionnetworks.antflow.job.Job
PARAM_TYPE
 
Constructor Summary
HotFolderJob(com.onionnetworks.util.InvokingDispatch r, java.util.Timer t)
           
 
Method Summary
abstract  void go(ExecutorFactory executorFactory, java.io.File taskDir, java.util.Map args, WorkflowContext wfc)
          Creates a HotFolder for the task and does a scanNow().
static java.util.Map parseParams(java.lang.String argsStr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_DONE_MODE

public static final java.lang.String PARAM_DONE_MODE
See Also:
Constant Field Values

PARAM_MIN_AGE

public static final java.lang.String PARAM_MIN_AGE
See Also:
Constant Field Values

PARAM_THREADS

public static final java.lang.String PARAM_THREADS
See Also:
Constant Field Values

PARAM_PATTERN

public static final java.lang.String PARAM_PATTERN
See Also:
Constant Field Values

PARAM_ACCEPT

public static final java.lang.String PARAM_ACCEPT
See Also:
Constant Field Values

PARAM_REJECT

public static final java.lang.String PARAM_REJECT
See Also:
Constant Field Values

PARAM_INBOX_DIR

public static final java.lang.String PARAM_INBOX_DIR
See Also:
Constant Field Values

PARAM_IGNORE_EMPTY

public static final java.lang.String PARAM_IGNORE_EMPTY
See Also:
Constant Field Values

PARAM_CHECK_HASH

public static final java.lang.String PARAM_CHECK_HASH
See Also:
Constant Field Values

PARAM_MAX_FIRE_QUANTITY

public static final java.lang.String PARAM_MAX_FIRE_QUANTITY
See Also:
Constant Field Values

DONE_MODES

protected static final java.lang.String[] DONE_MODES

red

protected com.onionnetworks.util.InvokingDispatch red

timer

protected java.util.Timer timer
Constructor Detail

HotFolderJob

public HotFolderJob(com.onionnetworks.util.InvokingDispatch r,
                    java.util.Timer t)
Method Detail

go

public abstract void go(ExecutorFactory executorFactory,
                        java.io.File taskDir,
                        java.util.Map args,
                        WorkflowContext wfc)
                 throws java.io.IOException
Creates a HotFolder for the task and does a scanNow().

Specified by:
go in interface Job
Parameters:
taskDir - directory for the task to which this job is linked
args - any extra arguments provided for job invocation, likely extra text on the cron line
wfc - the WorkflowContext on which to execute tasks
Throws:
java.io.IOException - on problems with taskDir

parseParams

public static java.util.Map parseParams(java.lang.String argsStr)
                                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2003-2004 Onion Networks. All Rights Reserved.