Package org.citrusframework.ftp.message
Class FtpMessage
java.lang.Object
org.citrusframework.message.DefaultMessage
org.citrusframework.ftp.message.FtpMessage
- All Implemented Interfaces:
Serializable,Message
- Since:
- 2.7.5
- Author:
- Christoph Deppisch
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the command args.static FtpMessagecommand(org.apache.commons.net.ftp.FTPCmd command) Sets the ftp command.static FtpMessageCreates new connect command message.static FtpMessageCreates new delete command message.static FtpMessagedeleteResult(int replyCode, String replyString, boolean success) static FtpMessageerror()static FtpMessageerror(int replyCode) static FtpMessagestatic FtpMessageCreates new get command message.static FtpMessageCreates new get command message.static FtpMessageCreates new get command message.Gets the command args.<T> TgetPayload(Class<T> type) <T> TgetPayload(Class<T> type, FtpMarshaller marshaller) getPayload(FtpMarshaller marshaller) Gets the reply code.Gets the reply string.Gets the ftp command signal.booleanCheck if reply code is set on this message.booleanCheck if reply code is set on this message.static FtpMessageCreates new delete command message.marshaller(FtpMarshaller marshaller) static FtpMessageCreates new put command message.static FtpMessageCreates new put command message.static FtpMessageCreates new put command message.static FtpMessagestatic FtpMessagestatic FtpMessagestatic FtpMessagestatic FtpMessageresult(CommandResultType commandResult) setPayload(Object payload) static FtpMessagesuccess()static FtpMessagesuccess(int replyCode) static FtpMessageMethods inherited from class org.citrusframework.message.DefaultMessage
addHeaderData, getHeader, getHeaderData, getHeaders, getId, getName, getTimestamp, getType, removeHeader, setHeader, setName, setType, setType, toString
-
Constructor Details
-
FtpMessage
Constructs copy of given message.- Parameters:
message-
-
-
Method Details
-
command
Sets the ftp command.- Parameters:
command-- Returns:
-
connect
Creates new connect command message.- Parameters:
sessionId-- Returns:
-
put
Creates new put command message.- Parameters:
localPath-- Returns:
-
put
Creates new put command message.- Parameters:
localPath-type-- Returns:
-
put
public static FtpMessage put(String localPath, String remotePath, org.apache.ftpserver.ftplet.DataType type) Creates new put command message.- Parameters:
localPath-remotePath-type-- Returns:
-
get
Creates new get command message.- Parameters:
remotePath-- Returns:
-
get
Creates new get command message.- Parameters:
remotePath-type-- Returns:
-
get
public static FtpMessage get(String remotePath, String localPath, org.apache.ftpserver.ftplet.DataType type) Creates new get command message.- Parameters:
remotePath-localPath-type-- Returns:
-
delete
Creates new delete command message.- Parameters:
remotePath-- Returns:
-
list
Creates new delete command message.- Parameters:
remotePath-- Returns:
-
success
-
success
-
success
-
error
-
error
-
error
-
result
-
deleteResult
-
putResult
-
result
-
result
-
result
-
arguments
Sets the command args.- Parameters:
arguments-
-
getSignal
Gets the ftp command signal. -
getArguments
Gets the command args. -
getReplyCode
Gets the reply code. -
hasReplyCode
public boolean hasReplyCode()Check if reply code is set on this message.- Returns:
-
hasException
public boolean hasException()Check if reply code is set on this message.- Returns:
-
getReplyString
Gets the reply string. -
getPayload
- Specified by:
getPayloadin interfaceMessage- Overrides:
getPayloadin classDefaultMessage
-
getPayload
-
getPayload
- Specified by:
getPayloadin interfaceMessage- Overrides:
getPayloadin classDefaultMessage
-
getPayload
-
setPayload
- Specified by:
setPayloadin interfaceMessage- Overrides:
setPayloadin classDefaultMessage
-
marshaller
-