@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
IOException
public void close()
close
in interface SecureChannel
public List<CommandResult> exec(String... commands)
SecureChannel
exec
in interface SecureChannel
public List<CommandResult> exec(CommandContext... contexts)
exec
in interface SecureChannel
public CommandResult exec(String command)
SecureChannel
exec
in interface SecureChannel
public CommandResult exec(CommandContext context)
exec
in interface SecureChannel
protected void validate(CommandContext context, CommandResult result) throws UnsupportedEncodingException
UnsupportedEncodingException
protected com.jcraft.jsch.ChannelExec getChannelExec() throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchException
public void execNoWait(String command)
SecureChannel
execNoWait
in interface SecureChannel
public void execNoWait(byte[] command)
execNoWait
in interface SecureChannel
protected void waitForClosed(com.jcraft.jsch.ChannelExec exec, long millis)
public RemoteFile getWorkingDirectory()
getWorkingDirectory
in interface SecureChannel
protected 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.JSchException
protected void connect(com.jcraft.jsch.Channel channel, com.google.common.base.Optional<Integer> timeout) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchException
protected 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.JSchException
protected 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.JSchException
protected static List<File> getUniquePrivateKeyFiles(List<File> privateKeys, boolean useConfigFile, File config, boolean includeDefaultPrivateKeyLocations)
public RemoteFile getMetaData(String absolutePath)
getMetaData
in interface SecureChannel
public void deleteFile(String absolutePath)
deleteFile
in interface SecureChannel
public boolean exists(String absolutePath)
exists
in interface SecureChannel
public boolean isDirectory(String absolutePath)
isDirectory
in interface SecureChannel
protected RemoteFile fillInAttributes(String path)
protected RemoteFile fillInAttributes(String path, com.jcraft.jsch.SftpATTRS attributes)
public CopyResult scp(File source, RemoteFile destination)
scp
in interface SecureChannel
public CopyResult scpToDir(File source, RemoteFile directory)
scpToDir
in interface SecureChannel
public CopyResult scp(String location, RemoteFile destination)
scp
in interface SecureChannel
public CopyResult scpString(String string, RemoteFile destination)
SecureChannel
string
to destination
scpString
in interface SecureChannel
public String toString(RemoteFile source)
toString
in interface SecureChannel
public CopyResult scp(InputStream source, RemoteFile destination)
scp
in interface SecureChannel
protected String getAbsolutePath(String absolutePath, String filename)
public CopyResult scpToDir(String location, RemoteFile directory)
scpToDir
in interface SecureChannel
public CopyResult scp(RemoteFile source, File destination)
scp
in interface SecureChannel
public CopyResult scp(String absolutePath, OutputStream out) throws IOException
scp
in interface SecureChannel
IOException
protected 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 SecureChannel
IOException
public CopyResult scpToDir(RemoteFile source, File destination)
scpToDir
in interface SecureChannel
public void createDirectory(RemoteFile dir)
createDirectory
in interface SecureChannel
protected void createDirectories(RemoteFile file) throws com.jcraft.jsch.SftpException
com.jcraft.jsch.SftpException
protected 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.SftpException
protected 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.