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
- Author:
- Apache MINA SSHD Project
-
-
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 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(String remote, OutputStream local)
protected void
download(String remote, FileSystem fs, Path local, Collection<ScpClient.Option> options)
ClientSession
getClientSession()
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 Detail
-
opener
protected final ScpFileOpener opener
-
listener
protected final ScpTransferEventListener listener
-
-
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(String remote, OutputStream local) throws IOException
- 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
-
-