@Deprecated public final class DefaultSecureChannel extends Object implements SecureChannel
| Constructor and Description |
|---|
DefaultSecureChannel(ChannelContext context)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
|
protected void |
closeQuietly(com.jcraft.jsch.Channel channel)
Deprecated.
|
protected void |
closeQuietly(com.jcraft.jsch.Session session)
Deprecated.
|
protected void |
connect(com.jcraft.jsch.Channel channel,
com.google.common.base.Optional<Integer> timeout)
Deprecated.
|
protected void |
createDirectories(RemoteFile file)
Deprecated.
|
void |
createDirectory(RemoteFile dir)
Deprecated.
|
void |
deleteFile(String absolutePath)
Deprecated.
|
List<CommandResult> |
exec(CommandContext... contexts)
Deprecated.
|
CommandResult |
exec(CommandContext context)
Deprecated.
|
List<CommandResult> |
exec(String... commands)
Deprecated.
Pass each command to a remote server as a sequence of bytes encoded using UTF-8
|
CommandResult |
exec(String command)
Deprecated.
Pass this command to a remote server as a sequence of bytes encoded using UTF-8
|
void |
execNoWait(byte[] command)
Deprecated.
|
void |
execNoWait(String command)
Deprecated.
Pass this command to a remote server as a sequence of bytes encoded using UTF-8
|
boolean |
exists(String absolutePath)
Deprecated.
|
protected RemoteFile |
fillInAttributes(String path)
Deprecated.
|
protected RemoteFile |
fillInAttributes(String path,
com.jcraft.jsch.SftpATTRS attributes)
Deprecated.
|
protected void |
from(String absolutePath,
CopyResult result)
Deprecated.
Show information about the transfer of data from a remote server
|
protected String |
getAbsolutePath(String absolutePath,
String filename)
Deprecated.
|
protected com.jcraft.jsch.ChannelExec |
getChannelExec()
Deprecated.
|
protected String |
getInvalidExistingFileMessage(RemoteFile existing)
Deprecated.
|
protected com.jcraft.jsch.JSch |
getJSch()
Deprecated.
|
protected com.jcraft.jsch.JSch |
getJSch(List<File> privateKeys,
List<String> privateKeyStrings)
Deprecated.
|
RemoteFile |
getMetaData(String absolutePath)
Deprecated.
|
protected static List<File> |
getUniquePrivateKeyFiles(List<File> privateKeys,
boolean useConfigFile,
File config,
boolean includeDefaultPrivateKeyLocations)
Deprecated.
|
RemoteFile |
getWorkingDirectory()
Deprecated.
|
protected RemoteFile |
handleNoSuchFileException(String path,
com.jcraft.jsch.SftpException e)
Deprecated.
|
boolean |
isDirectory(String absolutePath)
Deprecated.
|
protected boolean |
isNoSuchFileException(com.jcraft.jsch.SftpException exception)
Deprecated.
|
protected boolean |
isStatus(RemoteFile file,
Status status)
Deprecated.
|
protected void |
log()
Deprecated.
|
protected void |
mkdir(RemoteFile dir)
Deprecated.
|
protected com.jcraft.jsch.Session |
openSession(com.jcraft.jsch.JSch jsch)
Deprecated.
|
protected com.jcraft.jsch.ChannelSftp |
openSftpChannel(com.jcraft.jsch.Session session,
com.google.common.base.Optional<Integer> timeout)
Deprecated.
|
CopyResult |
scp(File source,
RemoteFile destination)
Deprecated.
|
CopyResult |
scp(InputStream source,
RemoteFile destination)
Deprecated.
|
CopyResult |
scp(RemoteFile source,
File destination)
Deprecated.
|
CopyResult |
scp(RemoteFile source,
OutputStream out)
Deprecated.
|
CopyResult |
scp(String absolutePath,
OutputStream out)
Deprecated.
|
CopyResult |
scp(String location,
RemoteFile destination)
Deprecated.
|
CopyResult |
scpString(String string,
RemoteFile destination)
Deprecated.
Copy the contents of
string to destination |
CopyResult |
scpToDir(File source,
RemoteFile directory)
Deprecated.
|
CopyResult |
scpToDir(RemoteFile source,
File destination)
Deprecated.
|
CopyResult |
scpToDir(String location,
RemoteFile directory)
Deprecated.
|
protected void |
setAttributes(RemoteFile file)
Deprecated.
|
protected void |
to(RemoteFile destination,
CopyResult result)
Deprecated.
Show information about the transfer of data to a remote server
|
String |
toString(RemoteFile source)
Deprecated.
|
protected void |
validate(CommandContext context,
CommandResult result)
Deprecated.
|
protected void |
validate(RemoteFile file,
boolean directoryIndicator)
Deprecated.
|
protected void |
waitForClosed(com.jcraft.jsch.ChannelExec exec,
long millis)
Deprecated.
|
public DefaultSecureChannel(ChannelContext context) throws IOException
IOExceptionpublic void close()
close in interface SecureChannelpublic List<CommandResult> exec(String... commands)
SecureChannelexec in interface SecureChannelpublic List<CommandResult> exec(CommandContext... contexts)
exec in interface SecureChannelpublic CommandResult exec(String command)
SecureChannelexec in interface SecureChannelpublic CommandResult exec(CommandContext context)
exec in interface SecureChannelprotected void validate(CommandContext context, CommandResult result) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected com.jcraft.jsch.ChannelExec getChannelExec() throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionpublic void execNoWait(String command)
SecureChannelexecNoWait in interface SecureChannelpublic void execNoWait(byte[] command)
execNoWait in interface SecureChannelprotected void waitForClosed(com.jcraft.jsch.ChannelExec exec, long millis)
public RemoteFile getWorkingDirectory()
getWorkingDirectory in interface SecureChannelprotected void log()
protected com.jcraft.jsch.ChannelSftp openSftpChannel(com.jcraft.jsch.Session session, com.google.common.base.Optional<Integer> timeout) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionprotected void connect(com.jcraft.jsch.Channel channel, com.google.common.base.Optional<Integer> timeout) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionprotected void closeQuietly(com.jcraft.jsch.Session session)
protected void closeQuietly(com.jcraft.jsch.Channel channel)
protected com.jcraft.jsch.Session openSession(com.jcraft.jsch.JSch jsch) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionprotected com.jcraft.jsch.JSch getJSch()
protected com.jcraft.jsch.JSch getJSch(List<File> privateKeys, List<String> privateKeyStrings) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionprotected static List<File> getUniquePrivateKeyFiles(List<File> privateKeys, boolean useConfigFile, File config, boolean includeDefaultPrivateKeyLocations)
public RemoteFile getMetaData(String absolutePath)
getMetaData in interface SecureChannelpublic void deleteFile(String absolutePath)
deleteFile in interface SecureChannelpublic boolean exists(String absolutePath)
exists in interface SecureChannelpublic boolean isDirectory(String absolutePath)
isDirectory in interface SecureChannelprotected RemoteFile fillInAttributes(String path)
protected RemoteFile fillInAttributes(String path, com.jcraft.jsch.SftpATTRS attributes)
public CopyResult scp(File source, RemoteFile destination)
scp in interface SecureChannelpublic CopyResult scpToDir(File source, RemoteFile directory)
scpToDir in interface SecureChannelpublic CopyResult scp(String location, RemoteFile destination)
scp in interface SecureChannelpublic CopyResult scpString(String string, RemoteFile destination)
SecureChannelstring to destinationscpString in interface SecureChannelpublic String toString(RemoteFile source)
toString in interface SecureChannelpublic CopyResult scp(InputStream source, RemoteFile destination)
scp in interface SecureChannelprotected String getAbsolutePath(String absolutePath, String filename)
public CopyResult scpToDir(String location, RemoteFile directory)
scpToDir in interface SecureChannelpublic CopyResult scp(RemoteFile source, File destination)
scp in interface SecureChannelpublic CopyResult scp(String absolutePath, OutputStream out) throws IOException
scp in interface SecureChannelIOExceptionprotected void to(RemoteFile destination, CopyResult result)
protected void from(String absolutePath, CopyResult result)
public CopyResult scp(RemoteFile source, OutputStream out) throws IOException
scp in interface SecureChannelIOExceptionpublic CopyResult scpToDir(RemoteFile source, File destination)
scpToDir in interface SecureChannelpublic void createDirectory(RemoteFile dir)
createDirectory in interface SecureChannelprotected void createDirectories(RemoteFile file) throws com.jcraft.jsch.SftpException
com.jcraft.jsch.SftpExceptionprotected boolean isStatus(RemoteFile file, Status status)
protected void validate(RemoteFile file, boolean directoryIndicator)
protected String getInvalidExistingFileMessage(RemoteFile existing)
protected void mkdir(RemoteFile dir)
protected void setAttributes(RemoteFile file) throws com.jcraft.jsch.SftpException
com.jcraft.jsch.SftpExceptionprotected RemoteFile handleNoSuchFileException(String path, com.jcraft.jsch.SftpException e)
protected boolean isNoSuchFileException(com.jcraft.jsch.SftpException exception)
Copyright © 2010–2014 The Kuali Foundation. All rights reserved.