public class FtpDataAsyncConn extends Object
Constructor and Description |
---|
FtpDataAsyncConn(FtpSession session)
Constructor for Active session by default
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkCorrectChannel(io.netty.channel.Channel channel) |
void |
clear()
Clear the Data Connection
|
io.netty.channel.Channel |
getCurrentDataChannel()
Return the current Data Channel
|
DataNetworkHandler |
getDataNetworkHandler() |
FtpTransferControl |
getFtpTransferControl() |
InetSocketAddress |
getLocalAddress() |
int |
getLocalPort() |
FtpArgumentCode.TransferMode |
getMode() |
static int |
getNewPassivePort(FtpConfiguration configuration) |
InetSocketAddress |
getRemoteAddress() |
int |
getRemotePort() |
String |
getStatus() |
FtpArgumentCode.TransferStructure |
getStructure() |
FtpArgumentCode.TransferSubType |
getSubType() |
FtpArgumentCode.TransferType |
getType() |
boolean |
initPassiveConnection()
Initialize the socket from Server side (only used in Passive)
|
boolean |
isActive()
Is the Data dataChannel connected
|
boolean |
isBind() |
boolean |
isFileStreamBlockAsciiImage() |
boolean |
isPassiveMode() |
boolean |
isStreamFile() |
void |
setActive(InetSocketAddress address)
Change to active connection (reset localPort to default)
|
void |
setDataNetworkHandler(DataNetworkHandler dataNetworkHandler) |
void |
setLocalPort(int localPort)
Set the Local Port (Active or Passive)
|
void |
setMode(FtpArgumentCode.TransferMode transferMode) |
void |
setNewOpenedDataChannel(io.netty.channel.Channel dataChannel)
Set the new connected Data Channel
|
void |
setPassive()
Change to passive connection (all necessaries informations like local
port
should have been set)
|
void |
setStructure(FtpArgumentCode.TransferStructure transferStructure) |
void |
setSubType(FtpArgumentCode.TransferSubType transferSubType) |
void |
setType(FtpArgumentCode.TransferType transferType) |
String |
toString() |
void |
unbindData()
Unbind connection when close the Data Channel
|
public FtpDataAsyncConn(FtpSession session)
session
- public final boolean checkCorrectChannel(io.netty.channel.Channel channel)
channel
- public final void clear()
public final void setLocalPort(int localPort)
localPort
- public final InetSocketAddress getLocalAddress()
public final InetSocketAddress getRemoteAddress()
public final int getRemotePort()
public final int getLocalPort()
public final void setActive(InetSocketAddress address)
address
- remote addresspublic final void setPassive()
public final boolean isPassiveMode()
public final boolean isBind()
public final boolean isActive()
public final FtpArgumentCode.TransferMode getMode()
public final void setMode(FtpArgumentCode.TransferMode transferMode)
transferMode
- the transferMode to setpublic final FtpArgumentCode.TransferStructure getStructure()
public final void setStructure(FtpArgumentCode.TransferStructure transferStructure)
transferStructure
- the transferStructure to setpublic final FtpArgumentCode.TransferSubType getSubType()
public final void setSubType(FtpArgumentCode.TransferSubType transferSubType)
transferSubType
- the transferSubType to setpublic final FtpArgumentCode.TransferType getType()
public final void setType(FtpArgumentCode.TransferType transferType)
transferType
- the transferType to setpublic final boolean isFileStreamBlockAsciiImage()
public final boolean isStreamFile()
public final void unbindData()
public final boolean initPassiveConnection() throws Reply425Exception
Reply425Exception
public final io.netty.channel.Channel getCurrentDataChannel() throws FtpNoConnectionException
FtpNoConnectionException
public final DataNetworkHandler getDataNetworkHandler() throws FtpNoConnectionException
FtpNoConnectionException
public final void setDataNetworkHandler(DataNetworkHandler dataNetworkHandler)
dataNetworkHandler
- the DataNetworkHandler
to setpublic static int getNewPassivePort(FtpConfiguration configuration)
configuration
- public final String getStatus()
public final FtpTransferControl getFtpTransferControl()
public final void setNewOpenedDataChannel(io.netty.channel.Channel dataChannel) throws Reply425Exception
dataChannel
- the new Data ChannelReply425Exception
Copyright © 2009–2022 Waarp. All rights reserved.