public class UFTPTransferRequest extends UFTPBaseRequest
Modifier and Type | Field and Description |
---|---|
static String |
REQUEST_TYPE |
logger
Constructor and Description |
---|
UFTPTransferRequest(InetAddress client,
boolean send,
int numCons,
File file,
boolean append,
String secret,
String user,
String group,
byte[] key) |
UFTPTransferRequest(InetAddress client,
boolean send,
int numCons,
File file,
boolean append,
String secret,
String user,
String group,
byte[] key,
long rateLimit,
boolean compress) |
UFTPTransferRequest(Properties properties)
build a job from the given string in the java properties format
'client-ip=...' 'send=...' 'file=-...' 'numcons=...' 'secret=....'
|
UFTPTransferRequest(String properties) |
Modifier and Type | Method and Description |
---|---|
InetAddress |
getClient()
get the client IP address
|
long |
getCreatedTime()
get the instant at which this job was created
|
String |
getExcludes() |
File |
getFile() |
String |
getGroup() |
String |
getIncludes() |
byte[] |
getKey() |
int |
getNumCons()
Returns the number of parallel connections
|
long |
getRateLimit() |
protected String |
getRequestType() |
String |
getSecret()
returns the secret
|
String |
getUser() |
boolean |
isAppend()
whether the file should be appended to
|
boolean |
isCompress()
whether the data should be compressed during transfer
|
boolean |
isSendJob()
returns the send/receive mode
|
boolean |
isSession() |
static boolean |
isTransferRequest(Properties props) |
static Properties |
loadProperties(String props) |
String |
toString() |
void |
writeEncoded(OutputStream os)
writes out the job in properties format 'client-ip=...' 'send=...' etc
|
readResponse, sendTo, sendTo
public static final String REQUEST_TYPE
public UFTPTransferRequest(InetAddress client, boolean send, int numCons, File file, boolean append, String secret, String user, String group, byte[] key, long rateLimit, boolean compress)
client
- - Client's ip addresssend
- - true if this side should sendfile
- - file to send/receivenumCons
- - Number of concurrent connectionsappend
- appendsecret
- - authz secretuser
- - unix user namegroup
- - user's groupkey
- - encoded for encrypting/decryptingrateLimit
- - bandwidth limit in bytes per secondcompress
- - whether to compress datapublic UFTPTransferRequest(InetAddress client, boolean send, int numCons, File file, boolean append, String secret, String user, String group, byte[] key)
public UFTPTransferRequest(Properties properties) throws UnknownHostException, IOException
properties
- propertiesUnknownHostException
IOException
- when encoded properties cannot be readpublic UFTPTransferRequest(String properties) throws UnknownHostException, IOException
UnknownHostException
IOException
public static Properties loadProperties(String props) throws IOException
IOException
public InetAddress getClient()
public boolean isSendJob()
true
if this side sendspublic File getFile()
public boolean isAppend()
public boolean isCompress()
public int getNumCons()
public String getSecret()
public String getUser()
public String getGroup()
public long getRateLimit()
public byte[] getKey()
public void writeEncoded(OutputStream os) throws IOException
writeEncoded
in class UFTPBaseRequest
os
- output stream where the options are written toIOException
public String getIncludes()
public String getExcludes()
protected String getRequestType()
getRequestType
in class UFTPBaseRequest
public boolean isSession()
public long getCreatedTime()
public static boolean isTransferRequest(Properties props)
Copyright © 2010–2016 UNICORE. All rights reserved.