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
public class DefaultScpClient extends AbstractScpClient
-
-
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
Fields Modifier and Type Field Description private ClientSession
clientSession
protected ScpTransferEventListener
listener
protected ScpFileOpener
opener
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Constructor Description DefaultScpClient(ClientSession clientSession)
DefaultScpClient(ClientSession clientSession, ScpFileOpener fileOpener, ScpTransferEventListener eventListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
download(java.lang.String remote, java.io.OutputStream local)
protected void
download(java.lang.String remote, java.nio.file.FileSystem fs, java.nio.file.Path local, java.util.Collection<ScpClient.Option> options)
ClientSession
getClientSession()
protected <T> void
runUpload(java.lang.String remote, java.util.Collection<ScpClient.Option> options, java.util.Collection<T> local, AbstractScpClient.ScpOperationExecutor<T> executor)
void
upload(java.io.InputStream local, java.lang.String remote, long size, java.util.Collection<java.nio.file.attribute.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 Detail
-
opener
protected final ScpFileOpener opener
-
listener
protected final ScpTransferEventListener listener
-
clientSession
private final ClientSession clientSession
-
-
Constructor Detail
-
DefaultScpClient
public DefaultScpClient(ClientSession clientSession)
-
DefaultScpClient
public DefaultScpClient(ClientSession clientSession, ScpFileOpener fileOpener, ScpTransferEventListener eventListener)
-
-
Method Detail
-
getClientSession
public ClientSession getClientSession()
- Returns:
- The underlying
ClientSession
used
-
download
public void download(java.lang.String remote, java.io.OutputStream local) throws java.io.IOException
- Throws:
java.io.IOException
-
download
protected void download(java.lang.String remote, java.nio.file.FileSystem fs, java.nio.file.Path local, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Specified by:
download
in classAbstractScpClient
- Throws:
java.io.IOException
-
upload
public void upload(java.io.InputStream local, java.lang.String remote, long size, java.util.Collection<java.nio.file.attribute.PosixFilePermission> perms, ScpTimestampCommandDetails time) throws java.io.IOException
- Throws:
java.io.IOException
-
runUpload
protected <T> void runUpload(java.lang.String remote, java.util.Collection<ScpClient.Option> options, java.util.Collection<T> local, AbstractScpClient.ScpOperationExecutor<T> executor) throws java.io.IOException
- Specified by:
runUpload
in classAbstractScpClient
- Throws:
java.io.IOException
-
-