Package org.apache.sshd.sftp.client
Class SftpMessage
java.lang.Object
org.apache.sshd.sftp.client.SftpMessage
A representation of a written SFTP message.
- Author:
- Apache MINA SSHD Project
-
Constructor Summary
ConstructorsConstructorDescriptionSftpMessage(int id, IoWriteFuture future, Duration timeout) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves theIoWriteFutureof the message; can be used to wait until the message has been actually sent.intgetId()Retrieves the SFTP message id.Retrieves the write timeout configured when the message was sent.voidWaits with the configured timeout until the message has been sent.
-
Constructor Details
-
SftpMessage
Creates a new instance.- Parameters:
id- SFTP message idfuture-IoWriteFutureof the SFTP message; can be used to wait until the message has been actually senttimeout- the configured SFTP write timeout
-
-
Method Details
-
getId
public int getId()Retrieves the SFTP message id.- Returns:
- the SFTP message id
-
getFuture
Retrieves theIoWriteFutureof the message; can be used to wait until the message has been actually sent.- Returns:
- the
IoWriteFuture, nevernull
-
getTimeout
Retrieves the write timeout configured when the message was sent.- Returns:
- the timeout, never
null
-
waitUntilSent
Waits with the configured timeout until the message has been sent.- Throws:
IOException- if the message could not be sent, or waiting is interrupted.
-