Package org.apache.sshd.scp.client
Class DefaultScpClient
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.scp.client.AbstractScpClient
org.apache.sshd.scp.client.DefaultScpClient
- All Implemented Interfaces:
ClientSessionHolder
,SessionContextHolder
,SessionHolder<ClientSession>
,ScpClient
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sshd.scp.client.AbstractScpClient
AbstractScpClient.ScpOperationExecutor<T>
Nested classes/interfaces inherited from interface org.apache.sshd.scp.client.ScpClient
ScpClient.Option
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientSession
protected final ScpTransferEventListener
protected final ScpFileOpener
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultScpClient
(ClientSession clientSession) DefaultScpClient
(ClientSession clientSession, ScpFileOpener fileOpener, ScpTransferEventListener eventListener) -
Method Summary
Modifier and TypeMethodDescriptionvoid
download
(String remote, OutputStream local) protected void
download
(String remote, FileSystem fs, Path local, Collection<ScpClient.Option> options) protected <T> void
runUpload
(String remote, Collection<ScpClient.Option> options, Collection<T> local, AbstractScpClient.ScpOperationExecutor<T> executor) void
upload
(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) Methods inherited from class org.apache.sshd.scp.client.AbstractScpClient
addTargetIsDirectory, download, download, download, download, handleCommandExitStatus, handleCommandExitStatus, isOpen, openCommandChannel, upload, upload
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.scp.client.ScpClient
download, download, download, download, downloadBytes, getSession, upload, upload, upload, upload, upload, upload, upload, upload
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Field Details
-
opener
-
listener
-
clientSession
-
-
Constructor Details
-
DefaultScpClient
-
DefaultScpClient
public DefaultScpClient(ClientSession clientSession, ScpFileOpener fileOpener, ScpTransferEventListener eventListener)
-
-
Method Details
-
getClientSession
- Returns:
- The underlying
ClientSession
used
-
download
- Throws:
IOException
-
download
protected void download(String remote, FileSystem fs, Path local, Collection<ScpClient.Option> options) throws IOException - Specified by:
download
in classAbstractScpClient
- Throws:
IOException
-
upload
public void upload(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) throws IOException - Throws:
IOException
-
runUpload
protected <T> void runUpload(String remote, Collection<ScpClient.Option> options, Collection<T> local, AbstractScpClient.ScpOperationExecutor<T> executor) throws IOException - Specified by:
runUpload
in classAbstractScpClient
- Throws:
IOException
-