Top Inners Fields Constructors Methods
org.apache.sshd.scp.client

public abstract Class AbstractScpClient

extends AbstractLoggingBean
implements ScpClient
Class Inheritance
All Implemented Interfaces
org.apache.sshd.scp.client.ScpClient, org.apache.sshd.client.session.ClientSessionHolder, org.apache.sshd.common.session.SessionHolder, org.apache.sshd.common.session.SessionContextHolder
Known Direct Subclasses
org.apache.sshd.scp.client.DefaultScpClient
Imports
java.io.IOException, java.nio.file.FileSystem, .Files, .LinkOption, .Path, java.util.Arrays, .Collection, .EnumSet, org.apache.sshd.client.channel.ChannelExec, .ClientChannel, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.FactoryManager, .SshException, org.apache.sshd.common.file.FileSystemFactory, org.apache.sshd.common.session.Session, org.apache.sshd.common.util.GenericUtils, .ValidateUtils, org.apache.sshd.common.util.io.IoUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean, org.apache.sshd.core.CoreModuleProperties, org.apache.sshd.scp.common.ScpException, .ScpHelper, org.apache.sshd.scp.common.helpers.ScpIoUtils

Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected Collection<ScpClient.Option>
public void
public void
public void
public void
protected abstract void
download(String remote, FileSystem fs, Path local, Collection<ScpClient.Option> options)

protected void
handleCommandExitStatus(String
The attempted remote copy command
cmd
,
ClientChannel
The ClientChannel through which the command was sent - Note: then channel may be in the process of being closed
channel
)

Invoked by the various upload/download methods after having successfully completed the remote copy command and (optionally) having received an exit status from the remote server.

protected void
handleCommandExitStatus(String
The attempted remote copy command
cmd
,
Integer
The exit status - if null then no status was reported
exitStatus
)

Invoked by the various upload/download methods after having successfully completed the remote copy command and (optionally) having received an exit status from the remote server

public boolean
protected ChannelExec
protected abstract <T> void
public void
public void
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Constructor Detail

AbstractScpClientback to summary
protected AbstractScpClient()

Method Detail

addTargetIsDirectoryback to summary
protected Collection<ScpClient.Option> addTargetIsDirectory(Collection<ScpClient.Option> options)
downloadback to summary
public void download(String[] remote, String local, Collection<ScpClient.Option> options) throws IOException

Implements org.apache.sshd.scp.client.ScpClient.download.

Annotations
@Override
downloadback to summary
public void download(String[] remote, Path local, Collection<ScpClient.Option> options) throws IOException

Implements org.apache.sshd.scp.client.ScpClient.download.

Annotations
@Override
downloadback to summary
public void download(String remote, Path local, Collection<ScpClient.Option> options) throws IOException

Implements org.apache.sshd.scp.client.ScpClient.download.

Annotations
@Override
downloadback to summary
public void download(String remote, String local, Collection<ScpClient.Option> options) throws IOException

Implements org.apache.sshd.scp.client.ScpClient.download.

Annotations
@Override
downloadback to summary
protected abstract void download(String remote, FileSystem fs, Path local, Collection<ScpClient.Option> options) throws IOException
handleCommandExitStatusback to summary
protected void handleCommandExitStatus(String cmd, ClientChannel channel) throws IOException

Invoked by the various upload/download methods after having successfully completed the remote copy command and (optionally) having received an exit status from the remote server. If no exit status received within CoreModuleProperties#CHANNEL_CLOSE_TIMEOUT the no further action is taken. Otherwise, the exit status is examined to ensure it is either OK or WARNING - if not, an ScpException is thrown

Parameters
cmd:String

The attempted remote copy command

channel:ClientChannel

The ClientChannel through which the command was sent - Note: then channel may be in the process of being closed

Exceptions
IOException:
If failed the command
See Also
handleCommandExitStatus(String, Integer)
handleCommandExitStatusback to summary
protected void handleCommandExitStatus(String cmd, Integer exitStatus) throws IOException

Invoked by the various upload/download methods after having successfully completed the remote copy command and (optionally) having received an exit status from the remote server

Parameters
cmd:String

The attempted remote copy command

exitStatus:Integer

The exit status - if null then no status was reported

Exceptions
IOException:
If received non-OK exit status
isOpenback to summary
public boolean isOpen()
openCommandChannelback to summary
protected ChannelExec openCommandChannel(ClientSession session, String cmd) throws IOException
runUploadback to summary
protected abstract <T> void runUpload(String remote, Collection<ScpClient.Option> options, Collection<T> local, AbstractScpClient.ScpOperationExecutor<T> executor) throws IOException
uploadback to summary
public void upload(String[] local, String remote, Collection<ScpClient.Option> options) throws IOException

Implements org.apache.sshd.scp.client.ScpClient.upload.

Annotations
@Override
uploadback to summary
public void upload(Path[] local, String remote, Collection<ScpClient.Option> options) throws IOException

Implements org.apache.sshd.scp.client.ScpClient.upload.

Annotations
@Override
org.apache.sshd.scp.client back to summary

public Interface AbstractScpClient.ScpOperationExecutor<T>

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void
execute(ScpHelper helper, Collection<T> local, Collection<ScpClient.Option> options)

Method Detail

executeback to summary
public void execute(ScpHelper helper, Collection<T> local, Collection<ScpClient.Option> options) throws IOException