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 AbstractScpClient
AbstractScpClient.ScpOperationExecutor<T>Nested classes/interfaces inherited from interface ScpClient
ScpClient.Option -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientSessionprotected final ScpTransferEventListenerprotected final ScpFileOpenerFields inherited from class AbstractLoggingBean
log -
Constructor Summary
ConstructorsConstructorDescriptionDefaultScpClient(ClientSession clientSession) DefaultScpClient(ClientSession clientSession, ScpFileOpener fileOpener, ScpTransferEventListener eventListener) -
Method Summary
Modifier and TypeMethodDescriptionvoiddownload(String remote, OutputStream local) protected voiddownload(String remote, FileSystem fs, Path local, Collection<ScpClient.Option> options) protected <T> voidrunUpload(String remote, Collection<ScpClient.Option> options, Collection<T> local, AbstractScpClient.ScpOperationExecutor<T> executor) voidupload(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) Methods inherited from class AbstractScpClient
addTargetIsDirectory, download, download, download, download, handleCommandExitStatus, handleCommandExitStatus, isOpen, openCommandChannel, upload, uploadMethods inherited from class AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ScpClient
download, download, download, download, downloadBytes, getSession, upload, upload, upload, upload, upload, upload, upload, uploadMethods inherited from interface 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
ClientSessionused
-
download
- Throws:
IOException
-
download
protected void download(String remote, FileSystem fs, Path local, Collection<ScpClient.Option> options) throws IOException - Specified by:
downloadin 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:
runUploadin classAbstractScpClient- Throws:
IOException
-