Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static int |
BUFFSIZE
NETWORK send/receive buffer size, this must be the same on client/server
if multiple streams are to be used
|
static String |
sessionModeTag
tag used as "filename" to indicate session mode, i.e.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
UFTPWorker(ServerThread server,
DPCServer.Connection connection,
UFTPTransferRequest job,
int maxStreams,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
int |
getBufferSize() |
DPCServer.Connection |
getConnection() |
UFTPTransferRequest |
getJob() |
protected void |
logUsage(boolean send,
long dataSize,
long consumedMillis)
computes transfer rates, bytes transferred and
logs it to the USAGE logger at INFO level
(If needed, Log4j can be configured to send these log messages to a specific file instead of the standard logfile) |
protected Socket |
makeSocket(int max,
DPCServer.Connection connection)
create a new Socket with the specified number of parallel TCP streams
|
protected void |
readData(Session session) |
void |
run()
Open data connections, perform the data transfer, and close the
connection.
|
protected void |
runSession(Session session)
transfer multiple files.
|
protected void |
runSingle(Session session,
File localFile)
transfer a single file - this is a UFTP-only behaviour not in line with the FTP protocol!
|
protected void |
sendData(Session session)
send data from a file
|
protected void |
sendStreamData(Session session)
send data from a file
|
protected void |
syncMaster(Session session) |
protected void |
syncSlave(Session session) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final int BUFFSIZE
public static final String sessionModeTag
public UFTPWorker(ServerThread server, DPCServer.Connection connection, UFTPTransferRequest job, int maxStreams, int bufferSize)
server
- connection
- job
- maxStreams
- bufferSize
- public void run()
protected void runSession(Session session)
protected void runSingle(Session session, File localFile)
protected void sendData(Session session) throws IOException, InterruptedException
session
- - the session containing the required informationIOException
InterruptedException
protected void readData(Session session) throws IOException
IOException
protected void sendStreamData(Session session) throws IOException, InterruptedException
session
- - the session containing the required informationIOException
InterruptedException
protected Socket makeSocket(int max, DPCServer.Connection connection) throws Exception
public UFTPTransferRequest getJob()
UFTPTransferRequest
for this connectionpublic DPCServer.Connection getConnection()
public int getBufferSize()
protected void logUsage(boolean send, long dataSize, long consumedMillis)
The format is: [Sent|Received] [clientIP] [user:group] [bytes] [kb/sec]
Copyright © 2010–2016 UNICORE. All rights reserved.