Class FtpMessage

java.lang.Object
org.citrusframework.message.DefaultMessage
org.citrusframework.ftp.message.FtpMessage
All Implemented Interfaces:
Serializable, Message

public class FtpMessage extends DefaultMessage
Since:
2.7.5
Author:
Christoph Deppisch
See Also:
  • Constructor Details

    • FtpMessage

      public FtpMessage(Message message)
      Constructs copy of given message.
      Parameters:
      message -
  • Method Details

    • command

      public static FtpMessage command(org.apache.commons.net.ftp.FTPCmd command)
      Sets the ftp command.
      Parameters:
      command -
      Returns:
    • connect

      public static FtpMessage connect(String sessionId)
      Creates new connect command message.
      Parameters:
      sessionId -
      Returns:
    • put

      public static FtpMessage put(String localPath)
      Creates new put command message.
      Parameters:
      localPath -
      Returns:
    • put

      public static FtpMessage put(String localPath, org.apache.ftpserver.ftplet.DataType type)
      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

      public static FtpMessage get(String remotePath)
      Creates new get command message.
      Parameters:
      remotePath -
      Returns:
    • get

      public static FtpMessage get(String remotePath, org.apache.ftpserver.ftplet.DataType type)
      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

      public static FtpMessage delete(String remotePath)
      Creates new delete command message.
      Parameters:
      remotePath -
      Returns:
    • list

      public static FtpMessage list(String remotePath)
      Creates new delete command message.
      Parameters:
      remotePath -
      Returns:
    • success

      public static FtpMessage success()
    • success

      public static FtpMessage success(int replyCode)
    • success

      public static FtpMessage success(int replyCode, String replyString)
    • error

      public static FtpMessage error()
    • error

      public static FtpMessage error(int replyCode)
    • error

      public static FtpMessage error(int replyCode, String replyString)
    • result

      public static FtpMessage result(int replyCode, String replyString, boolean success)
    • deleteResult

      public static FtpMessage deleteResult(int replyCode, String replyString, boolean success)
    • putResult

      public static FtpMessage putResult(int replyCode, String replyString, boolean success)
    • result

      public static FtpMessage result(CommandResultType commandResult)
    • result

      public static FtpMessage result(int replyCode, String replyString, List<String> fileNames)
    • result

      public static FtpMessage result(int replyCode, String replyString, String path, String content)
    • arguments

      public FtpMessage arguments(String arguments)
      Sets the command args.
      Parameters:
      arguments -
    • getSignal

      public String getSignal()
      Gets the ftp command signal.
    • getArguments

      public String getArguments()
      Gets the command args.
    • getReplyCode

      public Integer 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

      public String getReplyString()
      Gets the reply string.
    • getPayload

      public <T> T getPayload(Class<T> type)
      Specified by:
      getPayload in interface Message
      Overrides:
      getPayload in class DefaultMessage
    • getPayload

      public <T> T getPayload(Class<T> type, FtpMarshaller marshaller)
    • getPayload

      public Object getPayload()
      Specified by:
      getPayload in interface Message
      Overrides:
      getPayload in class DefaultMessage
    • getPayload

      public Object getPayload(FtpMarshaller marshaller)
    • setPayload

      public DefaultMessage setPayload(Object payload)
      Specified by:
      setPayload in interface Message
      Overrides:
      setPayload in class DefaultMessage
    • marshaller

      public FtpMessage marshaller(FtpMarshaller marshaller)