public class FtpSession extends Object implements org.waarp.common.file.SessionInterface
Constructor and Description |
---|
FtpSession(FtpConfiguration configuration,
BusinessHandler handler)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
String |
getAnswer() |
FtpAuth |
getAuth() |
static String |
getBasename(String path) |
int |
getBlockSize() |
BusinessHandler |
getBusinessHandler() |
FtpConfiguration |
getConfiguration()
Get the configuration
|
io.netty.channel.Channel |
getControlChannel() |
AbstractCommand |
getCurrentCommand() |
FtpDataAsyncConn |
getDataConn() |
FtpDir |
getDir() |
org.waarp.common.file.FileParameterInterface |
getFileParameter() |
NetworkHandler |
getNetworkHandler() |
AbstractCommand |
getPreviousCommand() |
org.waarp.common.command.ReplyCode |
getReplyCode() |
org.waarp.common.file.Restart |
getRestart() |
String |
getUniqueExtension() |
boolean |
isCurrentCommandFinished() |
boolean |
isDataSsl() |
boolean |
isReady() |
boolean |
isSsl() |
boolean |
isSslReady() |
void |
openDataConnection()
Try to open a connection.
|
void |
prepareSsl() |
void |
rein()
Reinitialize all connection parameters, including authentification
|
void |
reinitFtpAuth()
Reinitialize the authentication to the connection step
|
void |
setControlConnected()
This function is called when the Command Channel is connected (from channelConnected of the
NetworkHandler)
|
void |
setCurrentCommandFinished()
Set the Current Command as finished
|
void |
setDataSsl(boolean isDataSsl) |
void |
setExitErrorCode(String answer)
Set Exit code after an error
|
void |
setExitNormalCode(String answer)
Set Exit normal code
|
void |
setNextCommand(org.waarp.common.command.CommandInterface command)
Set the new current command
|
void |
setPreviousAsCurrentCommand()
Set the previous command as the new current command (used after a incorrect sequence of
commands or unknown command)
|
void |
setReady(boolean isReady) |
void |
setReplyCode(org.waarp.common.command.exception.CommandAbstractException exception) |
void |
setReplyCode(org.waarp.common.command.ReplyCode replyCode,
String answer) |
void |
setSpecialInit(FtpAuth auth,
FtpDir dir,
org.waarp.common.file.Restart restart)
Special initialization (FtpExec with Https session)
|
void |
setSsl(boolean isSsl) |
String |
toString() |
public FtpSession(FtpConfiguration configuration, BusinessHandler handler)
configuration
- handler
- public BusinessHandler getBusinessHandler()
public FtpConfiguration getConfiguration()
public FtpDir getDir()
getDir
in interface org.waarp.common.file.SessionInterface
public FtpDataAsyncConn getDataConn()
public FtpAuth getAuth()
getAuth
in interface org.waarp.common.file.SessionInterface
public org.waarp.common.file.Restart getRestart()
getRestart
in interface org.waarp.common.file.SessionInterface
public void setControlConnected()
public void setSpecialInit(FtpAuth auth, FtpDir dir, org.waarp.common.file.Restart restart)
auth
- dir
- restart
- public io.netty.channel.Channel getControlChannel()
public NetworkHandler getNetworkHandler()
public void setNextCommand(org.waarp.common.command.CommandInterface command)
command
- public AbstractCommand getCurrentCommand()
public AbstractCommand getPreviousCommand()
public void setPreviousAsCurrentCommand()
public boolean isCurrentCommandFinished()
public void setCurrentCommandFinished()
public String getAnswer()
public void setReplyCode(org.waarp.common.command.ReplyCode replyCode, String answer)
replyCode
- the replyCode to setanswer
- public void setReplyCode(org.waarp.common.command.exception.CommandAbstractException exception)
exception
- public void setExitErrorCode(String answer)
answer
- public void setExitNormalCode(String answer)
answer
- public org.waarp.common.command.ReplyCode getReplyCode()
public void clear()
clear
in interface org.waarp.common.file.SessionInterface
public boolean isReady()
public void setReady(boolean isReady)
isReady
- the isReady to setpublic int getBlockSize()
getBlockSize
in interface org.waarp.common.file.SessionInterface
public org.waarp.common.file.FileParameterInterface getFileParameter()
getFileParameter
in interface org.waarp.common.file.SessionInterface
public static String getBasename(String path)
path
- public void reinitFtpAuth()
public void rein()
public void openDataConnection() throws org.waarp.common.command.exception.Reply425Exception
org.waarp.common.command.exception.Reply425Exception
- if the connection cannot be openedpublic String getUniqueExtension()
getUniqueExtension
in interface org.waarp.common.file.SessionInterface
public boolean isSsl()
public void setSsl(boolean isSsl)
public void prepareSsl()
public boolean isSslReady()
public boolean isDataSsl()
public void setDataSsl(boolean isDataSsl)
Copyright © 2009–2019 Waarp. All rights reserved.