Package org.apache.sshd.client.scp
Interface ScpClient
-
- All Superinterfaces:
ClientSessionHolder
,SessionContextHolder
,SessionHolder<ClientSession>
- All Known Subinterfaces:
CloseableScpClient
- All Known Implementing Classes:
AbstractScpClient
,DefaultScpClient
public interface ScpClient extends SessionHolder<ClientSession>, ClientSessionHolder
- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ScpClient.Option
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_EXEC_CHANNEL_EXIT_STATUS_TIMEOUT
static long
DEFAULT_EXEC_CHANNEL_OPEN_TIMEOUT
static String
SCP_EXEC_CHANNEL_EXIT_STATUS_TIMEOUT
Configurable value of theFactoryManager
for controlling the wait timeout for waiting on a channel exit status' for an SCP command in milliseconds.static String
SCP_EXEC_CHANNEL_OPEN_TIMEOUT
Configurable value of theFactoryManager
for controlling the wait timeout for opening a channel for an SCP command in milliseconds.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static String
createReceiveCommand(String remote, Collection<ScpClient.Option> options)
static String
createSendCommand(String remote, Collection<ScpClient.Option> options)
void
download(String[] remote, String local, Collection<ScpClient.Option> options)
default void
download(String[] remote, String local, ScpClient.Option... options)
void
download(String[] remote, Path local, Collection<ScpClient.Option> options)
default void
download(String[] remote, Path local, ScpClient.Option... options)
void
download(String remote, OutputStream local)
void
download(String remote, String local, Collection<ScpClient.Option> options)
default void
download(String remote, String local, ScpClient.Option... options)
void
download(String remote, Path local, Collection<ScpClient.Option> options)
default void
download(String remote, Path local, ScpClient.Option... options)
default byte[]
downloadBytes(String remote)
default ClientSession
getSession()
default void
upload(byte[] data, int offset, int len, String remote, Collection<PosixFilePermission> perms, ScpTimestamp time)
default void
upload(byte[] data, String remote, Collection<PosixFilePermission> perms, ScpTimestamp time)
void
upload(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestamp time)
void
upload(String[] local, String remote, Collection<ScpClient.Option> options)
default void
upload(String[] local, String remote, ScpClient.Option... options)
default void
upload(String local, String remote, Collection<ScpClient.Option> options)
default void
upload(String local, String remote, ScpClient.Option... options)
void
upload(Path[] local, String remote, Collection<ScpClient.Option> options)
default void
upload(Path[] local, String remote, ScpClient.Option... options)
default void
upload(Path local, String remote, Collection<ScpClient.Option> options)
default void
upload(Path local, String remote, ScpClient.Option... options)
-
Methods inherited from interface org.apache.sshd.client.session.ClientSessionHolder
getClientSession
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Field Detail
-
SCP_EXEC_CHANNEL_OPEN_TIMEOUT
static final String SCP_EXEC_CHANNEL_OPEN_TIMEOUT
Configurable value of theFactoryManager
for controlling the wait timeout for opening a channel for an SCP command in milliseconds. If not specified, thenDEFAULT_EXEC_CHANNEL_OPEN_TIMEOUT
value is used- See Also:
- Constant Field Values
-
DEFAULT_EXEC_CHANNEL_OPEN_TIMEOUT
static final long DEFAULT_EXEC_CHANNEL_OPEN_TIMEOUT
-
SCP_EXEC_CHANNEL_EXIT_STATUS_TIMEOUT
static final String SCP_EXEC_CHANNEL_EXIT_STATUS_TIMEOUT
Configurable value of theFactoryManager
for controlling the wait timeout for waiting on a channel exit status' for an SCP command in milliseconds. If not specified, thenDEFAULT_EXEC_CHANNEL_EXIT_STATUS_TIMEOUT
value is used. If non-positive, then no wait is performed and the command is assumed to have completed successfully.- See Also:
- Constant Field Values
-
DEFAULT_EXEC_CHANNEL_EXIT_STATUS_TIMEOUT
static final long DEFAULT_EXEC_CHANNEL_EXIT_STATUS_TIMEOUT
-
-
Method Detail
-
getSession
default ClientSession getSession()
- Specified by:
getSession
in interfaceSessionHolder<ClientSession>
-
download
default void download(String remote, String local, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
download
void download(String remote, String local, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
download
default void download(String remote, Path local, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
download
void download(String remote, Path local, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
download
void download(String remote, OutputStream local) throws IOException
- Throws:
IOException
-
downloadBytes
default byte[] downloadBytes(String remote) throws IOException
- Throws:
IOException
-
download
default void download(String[] remote, String local, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
download
default void download(String[] remote, Path local, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
download
void download(String[] remote, String local, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
download
void download(String[] remote, Path local, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
upload
default void upload(String local, String remote, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
upload
default void upload(String local, String remote, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
upload
default void upload(Path local, String remote, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
upload
default void upload(Path local, String remote, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
upload
default void upload(String[] local, String remote, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
upload
void upload(String[] local, String remote, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
upload
default void upload(Path[] local, String remote, ScpClient.Option... options) throws IOException
- Throws:
IOException
-
upload
void upload(Path[] local, String remote, Collection<ScpClient.Option> options) throws IOException
- Throws:
IOException
-
upload
default void upload(byte[] data, String remote, Collection<PosixFilePermission> perms, ScpTimestamp time) throws IOException
- Throws:
IOException
-
upload
default void upload(byte[] data, int offset, int len, String remote, Collection<PosixFilePermission> perms, ScpTimestamp time) throws IOException
- Throws:
IOException
-
upload
void upload(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestamp time) throws IOException
- Throws:
IOException
-
createSendCommand
static String createSendCommand(String remote, Collection<ScpClient.Option> options)
-
createReceiveCommand
static String createReceiveCommand(String remote, Collection<ScpClient.Option> options)
-
-