
public abstract class BusinessHandler extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
BusinessHandler()
Constructor with no argument (mandatory)
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
afterRunCommandKo(CommandAbstractException e)
Run when a FTP exception is catch (the channel is not necessary closed
after).
|
abstract void |
afterRunCommandOk()
This method is called for every received message after the execution of
the
command but before the final
reply to the client.
|
abstract void |
afterTransferDoneBeforeAnswer(FtpTransfer transfer)
Run when a transfer is finished (eventually in error) but before
answering.
|
abstract void |
beforeRunCommand()
This method is called for every received message before the execution of
the command.
|
protected abstract void |
cleanSession()
To Clean the session attached objects
|
void |
clear()
Clean the BusinessHandler.
|
abstract void |
exceptionLocalCaught(Throwable e)
Run when an exception is get before the channel is closed.
|
abstract void |
executeChannelClosed()
Is executed when the channel is closed, just before cleaning and just
after.
|
abstract void |
executeChannelConnected(io.netty.channel.Channel channel)
Is executed when the channel is connected after the handler is on, before
answering OK or not on
connection, except if the global service is going to shutdown.
|
abstract FtpAuth |
getBusinessNewAuth()
Create a new AuthInterface according to business choice
|
abstract FtpDir |
getBusinessNewDir()
Create a new FtpDir according to business choice
|
abstract Restart |
getBusinessNewRestart()
Create a new Restart according to business choice
|
protected String |
getDefaultFeatMessage() |
abstract String |
getFeatMessage() |
FtpSession |
getFtpSession() |
abstract String |
getHelpMessage(String arg) |
protected String |
getMLSxOptsMessage(String[] args) |
NetworkHandler |
getNetworkHandler() |
abstract String |
getOptsMessage(String[] args) |
abstract AbstractCommand |
getSpecializedSiteCommand(FtpSession session,
String line)
Check if a command pass to SITE command is legal
|
protected String |
getSslFeatMessage() |
void |
setNetworkHandler(NetworkHandler networkHandler)
Called when the NetworkHandler is created
|
protected BusinessHandler()
public void setNetworkHandler(NetworkHandler networkHandler)
networkHandler - the networkHandler to setpublic NetworkHandler getNetworkHandler()
public FtpSession getFtpSession()
public abstract FtpAuth getBusinessNewAuth()
public abstract FtpDir getBusinessNewDir()
public abstract Restart getBusinessNewRestart()
public abstract String getHelpMessage(String arg)
arg - the argument from HELP commandpublic abstract String getFeatMessage()
protected String getSslFeatMessage()
protected String getDefaultFeatMessage()
public abstract String getOptsMessage(String[] args) throws CommandAbstractException
args - CommandAbstractExceptionpublic abstract AbstractCommand getSpecializedSiteCommand(FtpSession session, String line)
session - line - protected String getMLSxOptsMessage(String[] args)
args - public abstract void executeChannelClosed()
protected abstract void cleanSession()
public void clear()
public abstract void executeChannelConnected(io.netty.channel.Channel channel)
channel - public abstract void exceptionLocalCaught(Throwable e)
e - public abstract void beforeRunCommand()
throws CommandAbstractException
CommandAbstractExceptionpublic abstract void afterRunCommandOk()
throws CommandAbstractException
CommandAbstractExceptionpublic abstract void afterRunCommandKo(CommandAbstractException e)
e - public abstract void afterTransferDoneBeforeAnswer(FtpTransfer transfer) throws CommandAbstractException
transfer - CommandAbstractExceptionCopyright © 2009–2020 Waarp. All rights reserved.