
public class FtpTransferControl extends Object
| Constructor and Description |
|---|
FtpTransferControl(FtpSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the FtpTransferControl (called when the data connection must be
over like from clear of
FtpDataAsyncConn, abort from ABOR or ending control
connection from NetworkHandler. |
FtpTransfer |
getExecutingFtpTransfer() |
boolean |
isFtpTransferExecuting()
Is a command currently executing (called from
NetworkHandler when
a
message is received to see if
another transfer command is already in execution, which is not allowed) |
void |
openDataConnection()
Wait for the client to be connected (Passive) or Wait for the server to
be
connected to the client (Active)
|
void |
resetWaitForOpenedDataChannel()
Allow to reset the waitForOpenedDataChannel
|
void |
setEndOfTransfer()
Set the current transfer as finished.
|
void |
setNewFtpTransfer(FtpCommandCode command,
FtpFile file)
Add a new transfer to be executed.
|
void |
setNewFtpTransfer(FtpCommandCode command,
List<String> list,
String path)
Add a new transfer to be executed.
|
void |
setOpenedDataChannel(io.netty.channel.Channel channel,
DataNetworkHandler dataNetworkHandler)
Set the new opened Channel (from channelConnected of
DataNetworkHandler) |
void |
setPreEndOfTransfer()
Called by channelClosed (from
DataNetworkHandler ) or
trueRetrieve
(from FtpFile) when the
transfer is over |
void |
setTransferAbortedFromInternal(boolean write)
To enable abort from internal error
|
void |
waitForDataNetworkHandlerReady()
Wait for the DataNetworkHandler to be ready (from trueRetrieve of
FtpFile) |
void |
waitForEndOfTransfer()
Wait for the current transfer to finish, called from
FtpTransferExecutor |
io.netty.channel.Channel |
waitForOpenedDataChannel()
Wait that the new opened connection is ready (same method in
FtpDataAsyncConn from openConnection) |
boolean |
waitFtpTransferExecuting() |
public FtpTransferControl(FtpSession session)
session - public final void waitForDataNetworkHandlerReady()
throws InterruptedException
FtpFile)InterruptedExceptionpublic final void setOpenedDataChannel(io.netty.channel.Channel channel,
DataNetworkHandler dataNetworkHandler)
DataNetworkHandler)channel - dataNetworkHandler - public final io.netty.channel.Channel waitForOpenedDataChannel()
throws InterruptedException
FtpDataAsyncConn from openConnection)InterruptedExceptionpublic final void resetWaitForOpenedDataChannel()
public final void openDataConnection()
throws Reply425Exception
Reply425Exceptionpublic final void setNewFtpTransfer(FtpCommandCode command, FtpFile file)
command - file - public final void setNewFtpTransfer(FtpCommandCode command, List<String> list, String path)
command - list - path - as Original Pathpublic final boolean waitFtpTransferExecuting()
public final boolean isFtpTransferExecuting()
NetworkHandler when
a
message is received to see if
another transfer command is already in execution, which is not allowed)public final FtpTransfer getExecutingFtpTransfer() throws FtpNoTransferException
FtpNoTransferExceptionpublic final void setEndOfTransfer()
FtpTransferExecutor when a transfer is over.public final void setTransferAbortedFromInternal(boolean write)
write - True means the message is write back to the control
command, false it is only preparedpublic final void setPreEndOfTransfer()
DataNetworkHandler ) or
trueRetrieve
(from FtpFile) when the
transfer is overpublic final void waitForEndOfTransfer()
throws InterruptedException
FtpTransferExecutorInterruptedExceptionpublic final void clear()
FtpDataAsyncConn, abort from ABOR or ending control
connection from NetworkHandler.Copyright © 2009–2022 Waarp. All rights reserved.