openr66.context.task
Class AbstractTask

java.lang.Object
  extended by openr66.context.task.AbstractTask
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
CopyRenameTask, CopyTask, DeleteTask, ExecJavaTask, ExecMoveTask, ExecOutputTask, ExecTask, LinkRenameTask, LogTask, MoveRenameTask, MoveTask, RescheduleTransferTask, TarTask, TransferTask, ValidFilePathTask, ZipTask

public abstract class AbstractTask
extends Object
implements Runnable

Abstract implementation of task

Author:
Frederic Bregier

Field Summary
static String ARCHPATH
          ARCH Path used
static String BLOCKSIZE
          Block size used
static String DATE
          Date in yyyyMMdd format
static String ERRORCODE
          Last Current Error Code
static String ERRORMSG
          Last Current Error Message
static String ERRORSTRCODE
          Last Current Error Code in Full String
static String FILESIZE
          Size of the current FILE
static String FULLTRANSFERID
          Full Transfer id (TRANSFERID_REQUESTERHOST_REQUESTEDHOST)
static String HOMEPATH
          HOME Path used
static String HOUR
          Hour in HHmmss format
static String INPATH
          IN Path used
static String LOCALEXEC
          If specified, use the LocalExec Daemon specified in the global configuration (default no usage of LocalExec)
static String LOCALHOST
          Local host id
static String LOCALHOSTADDR
          Local host address
static String NOWAIT
          If specified, no Wait for Task Validation (default is wait)
static String ORIGINALFILENAME
          Original FILENAME (basename) (before changing in retrieval part)
static String ORIGINALFULLPATH
          Current full path of Original FILENAME (as transmitted) (before changing in retrieval part)
static String OUTPATH
          OUT Path used
static String RANKTRANSFER
          Current or final RANK of block
static String REMOTEHOST
          Remote host id (if not the initiator of the call)
static String REMOTEHOSTADDR
          Remote host address
static String REQUESTEDHOST
          Requested Host
static String REQUESTERHOST
          Requester Host
static String RULE
          Current full path of current RULE
static String TRANSFERID
          Transfer id
static String TRUEFILENAME
          Current FILENAME (basename) (change in retrieval part)
static String TRUEFULLPATH
          Current full path of current FILENAME
static String WORKPATH
          WORK Path used
 
Method Summary
 R66Future getFutureCompletion()
           
protected  String getReplacedValue(String arg, Object[] argFormat)
           
 boolean isSuccess()
           
abstract  void run()
          This is the only interface to execute an operator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUEFULLPATH

public static final String TRUEFULLPATH
Current full path of current FILENAME

See Also:
Constant Field Values

TRUEFILENAME

public static final String TRUEFILENAME
Current FILENAME (basename) (change in retrieval part)

See Also:
Constant Field Values

ORIGINALFULLPATH

public static final String ORIGINALFULLPATH
Current full path of Original FILENAME (as transmitted) (before changing in retrieval part)

See Also:
Constant Field Values

ORIGINALFILENAME

public static final String ORIGINALFILENAME
Original FILENAME (basename) (before changing in retrieval part)

See Also:
Constant Field Values

FILESIZE

public static final String FILESIZE
Size of the current FILE

See Also:
Constant Field Values

RULE

public static final String RULE
Current full path of current RULE

See Also:
Constant Field Values

DATE

public static final String DATE
Date in yyyyMMdd format

See Also:
Constant Field Values

HOUR

public static final String HOUR
Hour in HHmmss format

See Also:
Constant Field Values

REMOTEHOST

public static final String REMOTEHOST
Remote host id (if not the initiator of the call)

See Also:
Constant Field Values

REMOTEHOSTADDR

public static final String REMOTEHOSTADDR
Remote host address

See Also:
Constant Field Values

LOCALHOST

public static final String LOCALHOST
Local host id

See Also:
Constant Field Values

LOCALHOSTADDR

public static final String LOCALHOSTADDR
Local host address

See Also:
Constant Field Values

TRANSFERID

public static final String TRANSFERID
Transfer id

See Also:
Constant Field Values

REQUESTERHOST

public static final String REQUESTERHOST
Requester Host

See Also:
Constant Field Values

REQUESTEDHOST

public static final String REQUESTEDHOST
Requested Host

See Also:
Constant Field Values

FULLTRANSFERID

public static final String FULLTRANSFERID
Full Transfer id (TRANSFERID_REQUESTERHOST_REQUESTEDHOST)

See Also:
Constant Field Values

RANKTRANSFER

public static final String RANKTRANSFER
Current or final RANK of block

See Also:
Constant Field Values

BLOCKSIZE

public static final String BLOCKSIZE
Block size used

See Also:
Constant Field Values

INPATH

public static final String INPATH
IN Path used

See Also:
Constant Field Values

OUTPATH

public static final String OUTPATH
OUT Path used

See Also:
Constant Field Values

WORKPATH

public static final String WORKPATH
WORK Path used

See Also:
Constant Field Values

ARCHPATH

public static final String ARCHPATH
ARCH Path used

See Also:
Constant Field Values

HOMEPATH

public static final String HOMEPATH
HOME Path used

See Also:
Constant Field Values

ERRORMSG

public static final String ERRORMSG
Last Current Error Message

See Also:
Constant Field Values

ERRORCODE

public static final String ERRORCODE
Last Current Error Code

See Also:
Constant Field Values

ERRORSTRCODE

public static final String ERRORSTRCODE
Last Current Error Code in Full String

See Also:
Constant Field Values

NOWAIT

public static final String NOWAIT
If specified, no Wait for Task Validation (default is wait)

See Also:
Constant Field Values

LOCALEXEC

public static final String LOCALEXEC
If specified, use the LocalExec Daemon specified in the global configuration (default no usage of LocalExec)

See Also:
Constant Field Values
Method Detail

run

public abstract void run()
This is the only interface to execute an operator.

Specified by:
run in interface Runnable

isSuccess

public boolean isSuccess()
Returns:
True if the operation is in success status

getFutureCompletion

public R66Future getFutureCompletion()
Returns:
the R66Future of completion

getReplacedValue

protected String getReplacedValue(String arg,
                                  Object[] argFormat)
Parameters:
arg - as the Format string where FIXED items will be replaced by context values and next using argFormat as format second argument; this arg comes from the rule itself
argFormat - as format second argument; this argFormat comes from the transfer Information itself
Returns:
The string with replaced values from context and second argument


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.