Class SftpMessage

java.lang.Object
org.apache.sshd.sftp.client.SftpMessage

public class SftpMessage extends Object
A representation of a written SFTP message.
Author:
Apache MINA SSHD Project
  • Constructor Summary

    Constructors
    Constructor
    Description
    SftpMessage(int id, org.apache.sshd.common.io.IoWriteFuture future, Duration timeout)
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.sshd.common.io.IoWriteFuture
    Retrieves the IoWriteFuture of the message; can be used to wait until the message has been actually sent.
    int
    Retrieves the SFTP message id.
    Retrieves the write timeout configured when the message was sent.
    void
    Waits with the configured timeout until the message has been sent.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SftpMessage

      public SftpMessage(int id, org.apache.sshd.common.io.IoWriteFuture future, Duration timeout)
      Creates a new instance.
      Parameters:
      id - SFTP message id
      future - IoWriteFuture of the SFTP message; can be used to wait until the message has been actually sent
      timeout - the configured SFTP write timeout
  • Method Details

    • getId

      public int getId()
      Retrieves the SFTP message id.
      Returns:
      the SFTP message id
    • getFuture

      public org.apache.sshd.common.io.IoWriteFuture getFuture()
      Retrieves the IoWriteFuture of the message; can be used to wait until the message has been actually sent.
      Returns:
      the IoWriteFuture, never null
    • getTimeout

      public Duration getTimeout()
      Retrieves the write timeout configured when the message was sent.
      Returns:
      the timeout, never null
    • waitUntilSent

      public void waitUntilSent() throws IOException
      Waits with the configured timeout until the message has been sent.
      Throws:
      IOException - if the message could not be sent, or waiting is interrupted.