Top Description Fields Constructors Methods
org.apache.sshd.sftp.client

public Class SftpMessage

extends Object
Class Inheritance
Imports
java.io.IOException, java.time.Duration, java.util.Objects, org.apache.sshd.common.io.IoWriteFuture

A representation of a written SFTP message.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final IoWriteFuture
private final int
private final Duration

Constructor Summary

AccessConstructor and Description
public
SftpMessage(int
SFTP message id
id
,
IoWriteFuture
IoWriteFuture of the SFTP message; can be used to wait until the message has been actually sent
future
,
Duration
the configured SFTP write timeout
timeout
)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public IoWriteFuture

Returns:

the IoWriteFuture, never null
getFuture
()

Retrieves the IoWriteFuture of the message; can be used to wait until the message has been actually sent.

public int

Returns:

the SFTP message id
getId
()

Retrieves the SFTP message id.

public Duration

Returns:

the timeout, never null
getTimeout
()

Retrieves the write timeout configured when the message was sent.

public void
waitUntilSent()

Waits with the configured timeout until the message has been sent.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

futureback to summary
private final IoWriteFuture future
idback to summary
private final int id
timeoutback to summary
private final Duration timeout

Constructor Detail

SftpMessageback to summary
public SftpMessage(int id, IoWriteFuture future, Duration timeout)

Creates a new instance.

Parameters
id:int

SFTP message id

future:IoWriteFuture

IoWriteFuture of the SFTP message; can be used to wait until the message has been actually sent

timeout:Duration

the configured SFTP write timeout

Method Detail

getFutureback to summary
public IoWriteFuture getFuture()

Retrieves the IoWriteFuture of the message; can be used to wait until the message has been actually sent.

Returns:IoWriteFuture

the IoWriteFuture, never null

getIdback to summary
public int getId()

Retrieves the SFTP message id.

Returns:int

the SFTP message id

getTimeoutback to summary
public Duration getTimeout()

Retrieves the write timeout configured when the message was sent.

Returns:Duration

the timeout, never null

waitUntilSentback to summary
public void waitUntilSent() throws IOException

Waits with the configured timeout until the message has been sent.

Exceptions
IOException:
if the message could not be sent, or waiting is interrupted.