public abstract class AbstractTransfer extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected static int |
block |
protected R66Future |
future |
protected static long |
idt |
protected static String |
INFO_ARGS |
protected static boolean |
ismd5 |
protected static String |
localFilename |
protected static WaarpLogger |
logger
Internal Logger
|
protected static String |
NO_INFO_ARGS |
protected static boolean |
nolog |
protected boolean |
normalInfoAsWarn |
protected static String |
rhost |
protected static String |
rule |
protected static String |
sFollowId |
protected static boolean |
snormalInfoAsWarn |
static String |
TIMESTAMP_FORMAT |
protected TransferArgs |
transferArgs |
protected static String |
transferInfo |
protected static Timestamp |
ttimestart |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTransfer(Class<?> clasz,
R66Future future,
String filename,
String rulename,
String transferInfo,
boolean isMD5,
String remoteHost,
int blocksize,
long id,
Timestamp timestart) |
protected |
AbstractTransfer(Class<?> clasz,
R66Future future,
TransferArgs transferArgs) |
Modifier and Type | Method and Description |
---|---|
protected static void |
clear() |
protected void |
finalizeInErrorTransferRequest(ClientRunner runner,
DbTaskRunner taskRunner,
ErrorCode code)
Shared code for finalize one Transfer request in error
|
List<String> |
getLocalFiles(DbRule dbrule,
String[] localfilenames) |
protected static boolean |
getParams(String[] args,
boolean submitOnly)
Parse the parameter and set current values
|
static TransferArgs |
getParamsInternal(int rank,
String[] args)
Internal getParams without configuration initialization, but still as
first argument
Transfer arguments: -to (-id (-file -rule [-block [-nofollow] Specify the transfer should not integrate a FOLLOW id [-md5] Specify the option to have a hash computed for the transfer [-delay [-start [-info [-nolog] Specify to not log anything included database once the transfer is done [-notlogWarn | Specify to log final result as Info if OK -logWarn] Specify to log final result as Warn if OK |
List<String> |
getRemoteFiles(String[] localfilenames,
String requested,
NetworkTransaction networkTransaction) |
protected DbTaskRunner |
initRequest()
Initiate the Request and return a potential DbTaskRunner
|
protected static void |
prepareKoOutputFormat(R66Future future,
OutputFormat outputFormat) |
protected static void |
prepareKoOutputFormat(R66Future future,
R66Result result,
OutputFormat outputFormat) |
protected static void |
prepareOkOutputFormat(long delay,
R66Result result,
OutputFormat outputFormat) |
static void |
prepareSubmitKoOutputFormat(R66Future future,
DbTaskRunner runner,
OutputFormat outputFormat) |
static void |
prepareSubmitOkOutputFormat(DbTaskRunner runner,
OutputFormat outputFormat) |
static boolean |
sendValidPacket(DbHostAuth host,
LocalChannelReference localChannelReference,
AbstractLocalPacket packet,
R66Future future) |
void |
setNormalInfoAsWarn(boolean normalInfoAsWarn1) |
static LocalChannelReference |
tryConnect(DbHostAuth host,
R66Future future,
NetworkTransaction networkTransaction)
Helper to connect
|
public static final String TIMESTAMP_FORMAT
protected static WaarpLogger logger
protected static final String INFO_ARGS
protected static final String NO_INFO_ARGS
protected final TransferArgs transferArgs
protected final R66Future future
protected boolean normalInfoAsWarn
protected static String rhost
protected static String localFilename
protected static String rule
protected static String transferInfo
protected static boolean ismd5
protected static int block
protected static boolean nolog
protected static long idt
protected static Timestamp ttimestart
protected static boolean snormalInfoAsWarn
protected static String sFollowId
protected AbstractTransfer(Class<?> clasz, R66Future future, TransferArgs transferArgs)
clasz
- Class of Client Transferfuture
- transferArgs
- protected AbstractTransfer(Class<?> clasz, R66Future future, String filename, String rulename, String transferInfo, boolean isMD5, String remoteHost, int blocksize, long id, Timestamp timestart)
clasz
- Class of Client Transferfuture
- filename
- rulename
- transferInfo
- isMD5
- remoteHost
- blocksize
- id
- public static boolean sendValidPacket(DbHostAuth host, LocalChannelReference localChannelReference, AbstractLocalPacket packet, R66Future future)
host
- localChannelReference
- packet
- future
- protected final DbTaskRunner initRequest()
protected static final void clear()
protected static boolean getParams(String[] args, boolean submitOnly)
args
- submitOnly
- True if the client is only a submitter (through
database)public static TransferArgs getParamsInternal(int rank, String[] args)
rank
- which rank to start on argsargs
- protected final void finalizeInErrorTransferRequest(ClientRunner runner, DbTaskRunner taskRunner, ErrorCode code)
runner
- taskRunner
- public final void setNormalInfoAsWarn(boolean normalInfoAsWarn1)
public final List<String> getRemoteFiles(String[] localfilenames, String requested, NetworkTransaction networkTransaction)
public static LocalChannelReference tryConnect(DbHostAuth host, R66Future future, NetworkTransaction networkTransaction)
host
- future
- networkTransaction
- protected static void prepareKoOutputFormat(R66Future future, R66Result result, OutputFormat outputFormat)
protected static void prepareKoOutputFormat(R66Future future, OutputFormat outputFormat)
protected static void prepareOkOutputFormat(long delay, R66Result result, OutputFormat outputFormat)
public static void prepareSubmitKoOutputFormat(R66Future future, DbTaskRunner runner, OutputFormat outputFormat)
public static void prepareSubmitOkOutputFormat(DbTaskRunner runner, OutputFormat outputFormat)
Copyright © 2009–2022 Waarp. All rights reserved.