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 |
unbindPassive()
Unbind passive connection when close the Data Channel (from channelInactive())
|
public FtpDataAsyncConn(FtpSession session)
session
- public boolean checkCorrectChannel(io.netty.channel.Channel channel)
channel
- public void clear()
public void setLocalPort(int localPort)
localPort
- public InetSocketAddress getLocalAddress()
public InetSocketAddress getRemoteAddress()
public int getRemotePort()
public int getLocalPort()
public void setActive(InetSocketAddress address)
address
- remote addresspublic void setPassive()
public boolean isPassiveMode()
public boolean isBind()
public boolean isActive()
public FtpArgumentCode.TransferMode getMode()
public void setMode(FtpArgumentCode.TransferMode transferMode)
transferMode
- the transferMode to setpublic FtpArgumentCode.TransferStructure getStructure()
public void setStructure(FtpArgumentCode.TransferStructure transferStructure)
transferStructure
- the transferStructure to setpublic FtpArgumentCode.TransferSubType getSubType()
public void setSubType(FtpArgumentCode.TransferSubType transferSubType)
transferSubType
- the transferSubType to setpublic FtpArgumentCode.TransferType getType()
public void setType(FtpArgumentCode.TransferType transferType)
transferType
- the transferType to setpublic boolean isFileStreamBlockAsciiImage()
public boolean isStreamFile()
public void unbindPassive()
public boolean initPassiveConnection() throws org.waarp.common.command.exception.Reply425Exception
org.waarp.common.command.exception.Reply425Exception
public io.netty.channel.Channel getCurrentDataChannel() throws FtpNoConnectionException
FtpNoConnectionException
public DataNetworkHandler getDataNetworkHandler() throws FtpNoConnectionException
FtpNoConnectionException
public void setDataNetworkHandler(DataNetworkHandler dataNetworkHandler)
dataNetworkHandler
- the DataNetworkHandler
to setpublic static int getNewPassivePort(FtpConfiguration configuration)
configuration
- public String getStatus()
public FtpTransferControl getFtpTransferControl()
public void setNewOpenedDataChannel(io.netty.channel.Channel dataChannel) throws InterruptedException, org.waarp.common.command.exception.Reply425Exception
dataChannel
- the new Data ChannelInterruptedException
org.waarp.common.command.exception.Reply425Exception
Copyright © 2009–2019 Waarp. All rights reserved.