public class FtpMessage extends DefaultMessage
| Constructor and Description |
|---|
FtpMessage(Message message)
Constructs copy of given message.
|
| Modifier and Type | Method and Description |
|---|---|
FtpMessage |
arguments(String arguments)
Sets the command args.
|
static FtpMessage |
command(org.apache.commons.net.ftp.FTPCmd command)
Sets the ftp command.
|
static FtpMessage |
connect(String sessionId)
Creates new connect command message.
|
static FtpMessage |
delete(String remotePath)
Creates new delete command message.
|
static FtpMessage |
deleteResult(int replyCode,
String replyString,
boolean success) |
static FtpMessage |
error() |
static FtpMessage |
error(int replyCode) |
static FtpMessage |
error(int replyCode,
String replyString) |
static FtpMessage |
get(String remotePath)
Creates new get command message.
|
static FtpMessage |
get(String remotePath,
org.apache.ftpserver.ftplet.DataType type)
Creates new get command message.
|
static FtpMessage |
get(String remotePath,
String localPath,
org.apache.ftpserver.ftplet.DataType type)
Creates new get command message.
|
String |
getArguments()
Gets the command args.
|
Object |
getPayload() |
<T> T |
getPayload(Class<T> type) |
Integer |
getReplyCode()
Gets the reply code.
|
String |
getReplyString()
Gets the reply string.
|
String |
getSignal()
Gets the ftp command signal.
|
boolean |
hasException()
Check if reply code is set on this message.
|
boolean |
hasReplyCode()
Check if reply code is set on this message.
|
static FtpMessage |
list(String remotePath)
Creates new delete command message.
|
static FtpMessage |
put(String localPath)
Creates new put command message.
|
static FtpMessage |
put(String localPath,
org.apache.ftpserver.ftplet.DataType type)
Creates new put command message.
|
static FtpMessage |
put(String localPath,
String remotePath,
org.apache.ftpserver.ftplet.DataType type)
Creates new put command message.
|
static FtpMessage |
putResult(int replyCode,
String replyString,
boolean success) |
static FtpMessage |
result(CommandResultType commandResult) |
static FtpMessage |
result(int replyCode,
String replyString,
boolean success) |
static FtpMessage |
result(int replyCode,
String replyString,
List<String> fileNames) |
static FtpMessage |
result(int replyCode,
String replyString,
String path,
String content) |
static FtpMessage |
success() |
static FtpMessage |
success(int replyCode) |
static FtpMessage |
success(int replyCode,
String replyString) |
addHeaderData, getHeader, getHeaderData, getHeaders, getId, getName, getTimestamp, removeHeader, setHeader, setName, setPayload, toStringpublic FtpMessage(Message message)
message - public static FtpMessage command(org.apache.commons.net.ftp.FTPCmd command)
command - public static FtpMessage connect(String sessionId)
sessionId - public static FtpMessage put(String localPath)
localPath - public static FtpMessage put(String localPath, org.apache.ftpserver.ftplet.DataType type)
localPath - type - public static FtpMessage put(String localPath, String remotePath, org.apache.ftpserver.ftplet.DataType type)
localPath - remotePath - type - public static FtpMessage get(String remotePath)
remotePath - public static FtpMessage get(String remotePath, org.apache.ftpserver.ftplet.DataType type)
remotePath - type - public static FtpMessage get(String remotePath, String localPath, org.apache.ftpserver.ftplet.DataType type)
remotePath - localPath - type - public static FtpMessage delete(String remotePath)
remotePath - public static FtpMessage list(String remotePath)
remotePath - public static FtpMessage success()
public static FtpMessage success(int replyCode)
public static FtpMessage success(int replyCode, String replyString)
public static FtpMessage error()
public static FtpMessage error(int replyCode)
public static FtpMessage error(int replyCode, String replyString)
public static FtpMessage result(int replyCode, String replyString, boolean success)
public static FtpMessage deleteResult(int replyCode, String replyString, boolean success)
public static FtpMessage putResult(int replyCode, String replyString, boolean success)
public static FtpMessage result(CommandResultType commandResult)
public static FtpMessage result(int replyCode, String replyString, List<String> fileNames)
public static FtpMessage result(int replyCode, String replyString, String path, String content)
public FtpMessage arguments(String arguments)
arguments - public String getSignal()
public String getArguments()
public Integer getReplyCode()
public boolean hasReplyCode()
public boolean hasException()
public String getReplyString()
public <T> T getPayload(Class<T> type)
getPayload in interface MessagegetPayload in class DefaultMessagepublic Object getPayload()
getPayload in interface MessagegetPayload in class DefaultMessageCopyright © 2008–2019 ConSol Software GmbH. All rights reserved.