Package org.apache.sshd.cli.client
Class SftpCommandMain
java.lang.Object
org.apache.sshd.cli.CliSupport
org.apache.sshd.cli.client.SshClientCliSupport
org.apache.sshd.cli.client.SftpCommandMain
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,SftpClientHolder
TODO Add javadoc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate classprivate static classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SftpClientprivate final Map<String,SftpCommandExecutor> private Stringprivate Stringstatic final StringCommand line option used to indicate a non-default port numberprivate booleanFields inherited from class org.apache.sshd.cli.client.SshClientCliSupport
SSH_CLIENT_PORT_OPTIONFields inherited from class org.apache.sshd.cli.CliSupport
DEFAULT_IO_SERVICE_FACTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <A extends Appendable>
AappendFileAttributes(A stdout, SftpClient sftp, String path, SftpClient.Attributes attrs) static <A extends Appendable>
AappendInfoValue(A sb, CharSequence name, Object value) voidclose()voiddoInteractive(BufferedReader stdin, PrintStream stdout, PrintStream stderr) final SftpClientbooleanisOpen()booleanstatic voidprivate static OutputStreamresolveErrorDataHandlerStream(ClientSession session, org.slf4j.Logger logger) protected StringresolveLocalPath(String pathArg) protected StringresolveRemotePath(String pathArg) static SftpClientFactoryresolveSftpClientFactory(ClientSession session) resolveVersionSelector(ClientSession session) voidvoidvoidsetShowProgress(boolean showProgress) Methods inherited from class org.apache.sshd.cli.client.SshClientCliSupport
isArgumentedOption, resolveClientEnvironment, resolveClientEnvironment, resolveClientPtyModes, resolveClientPtyOptions, resolveClientPtyOptions, resolveHost, resolveIdentityFile, resolveLoggingTargetStream, resolveLoggingTargetStream, setupClient, setupClientSession, setupDefaultClient, setupLogging, setupServerKeyVerifier, setupSessionExtensions, setupSessionIdentities, setupSessionUserInteractionMethods inherited from class org.apache.sshd.cli.CliSupport
createLoggingIoServiceEventListener, createLoggingSessionListener, printFieldsValues, resolveBuiltinIoServiceFactory, resolveIoServiceFactory, setupCiphers, setupCiphers, setupCompressions, setupCompressions, setupIoServiceFactory, setupMacs, setupMacs, setupUserAuthFactories, splitCommandLineArguments
-
Field Details
-
SFTP_PORT_OPTION
Command line option used to indicate a non-default port number- See Also:
-
client
-
commandsMap
-
cwdRemote
-
cwdLocal
-
showProgress
private boolean showProgress
-
-
Constructor Details
-
SftpCommandMain
-
-
Method Details
-
getClient
- Specified by:
getClientin interfaceSftpClientHolder
-
doInteractive
public void doInteractive(BufferedReader stdin, PrintStream stdout, PrintStream stderr) throws Exception - Throws:
Exception
-
resolveLocalPath
-
resolveRemotePath
-
appendFileAttributes
protected <A extends Appendable> A appendFileAttributes(A stdout, SftpClient sftp, String path, SftpClient.Attributes attrs) throws IOException - Throws:
IOException
-
getCurrentRemoteDirectory
-
setCurrentRemoteDirectory
-
getCurrentLocalDirectory
-
setCurrentLocalDirectory
-
isShowProgress
public boolean isShowProgress() -
setShowProgress
public void setShowProgress(boolean showProgress) -
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
appendInfoValue
public static <A extends Appendable> A appendInfoValue(A sb, CharSequence name, Object value) throws IOException - Throws:
IOException
-
resolveSftpClientFactory
-
resolveVersionSelector
public static SftpVersionSelector.NamedVersionSelector resolveVersionSelector(ClientSession session) -
resolveErrorDataHandlerStream
private static OutputStream resolveErrorDataHandlerStream(ClientSession session, org.slf4j.Logger logger) -
main
- Throws:
Exception
-