Package org.apache.sshd.sftp.client
Class SftpMessage
java.lang.Object
org.apache.sshd.sftp.client.SftpMessage
A representation of a written SFTP message.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IoWriteFuture
private final int
private final Duration
-
Constructor Summary
ConstructorsConstructorDescriptionSftpMessage
(int id, IoWriteFuture future, Duration timeout) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves theIoWriteFuture
of the message; can be used to wait until the message has been actually sent.int
getId()
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.
-
Field Details
-
id
private final int id -
future
-
timeout
-
-
Constructor Details
-
SftpMessage
Creates a new instance.- Parameters:
id
- SFTP message idfuture
-IoWriteFuture
of 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 theIoWriteFuture
of 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.
-