@Deprecated public final class DefaultSecureChannel extends Object implements SecureChannel
Modifier and Type | Class and Description |
---|---|
static class |
DefaultSecureChannel.Builder
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.
|
void |
copyFile(File source,
RemoteFile destination)
Deprecated.
|
void |
copyFile(RemoteFile source,
File destination)
Deprecated.
|
void |
copyFile(RemoteFile source,
OutputStream out)
Deprecated.
|
void |
copyFileToDirectory(File source,
RemoteFile directory)
Deprecated.
|
void |
copyFileToDirectory(RemoteFile source,
File destination)
Deprecated.
|
void |
copyInputStreamToFile(InputStream source,
RemoteFile destination)
Deprecated.
|
void |
copyLocationToDirectory(String location,
RemoteFile directory)
Deprecated.
|
void |
copyLocationToFile(String location,
RemoteFile destination)
Deprecated.
|
void |
copyRemoteFile(String absolutePath,
OutputStream out)
Deprecated.
|
void |
copyStringToFile(String string,
RemoteFile destination)
Deprecated.
|
protected void |
createDirectories(RemoteFile file)
Deprecated.
|
void |
createDirectory(RemoteFile dir)
Deprecated.
|
void |
deleteFile(String absolutePath)
Deprecated.
|
Result |
executeCommand(String command)
Deprecated.
|
Result |
executeCommand(String command,
String stdin)
Deprecated.
|
void |
executeNoWait(String command)
Deprecated.
|
boolean |
exists(String absolutePath)
Deprecated.
|
protected RemoteFile |
fillInAttributes(String path)
Deprecated.
|
protected RemoteFile |
fillInAttributes(String path,
com.jcraft.jsch.SftpATTRS attributes)
Deprecated.
|
protected String |
getAbsolutePath(String absolutePath,
String filename)
Deprecated.
|
File |
getConfig()
Deprecated.
|
com.google.common.base.Optional<Integer> |
getConnectTimeout()
Deprecated.
|
String |
getEncoding()
Deprecated.
|
String |
getHostname()
Deprecated.
|
protected InputStream |
getInputStream(String s,
String encoding)
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.
|
File |
getKnownHosts()
Deprecated.
|
RemoteFile |
getMetaData(String absolutePath)
Deprecated.
|
Properties |
getOptions()
Deprecated.
|
int |
getPort()
Deprecated.
|
List<File> |
getPrivateKeys()
Deprecated.
|
List<String> |
getPrivateKeyStrings()
Deprecated.
|
com.jcraft.jsch.Session |
getSession()
Deprecated.
|
com.jcraft.jsch.ChannelSftp |
getSftp()
Deprecated.
|
protected static List<File> |
getUniquePrivateKeyFiles(List<File> privateKeys,
boolean useConfigFile,
File config,
boolean includeDefaultPrivateKeyLocations)
Deprecated.
|
String |
getUsername()
Deprecated.
|
int |
getWaitForClosedSleepMillis()
Deprecated.
|
RemoteFile |
getWorkingDirectory()
Deprecated.
|
protected RemoteFile |
handleNoSuchFileException(String path,
com.jcraft.jsch.SftpException e)
Deprecated.
|
boolean |
isDirectory(String absolutePath)
Deprecated.
|
boolean |
isIncludeDefaultPrivateKeyLocations()
Deprecated.
|
protected boolean |
isNoSuchFileException(com.jcraft.jsch.SftpException exception)
Deprecated.
|
protected boolean |
isStatus(RemoteFile file,
Status status)
Deprecated.
|
boolean |
isStrictHostKeyChecking()
Deprecated.
|
boolean |
isUseConfigFile()
Deprecated.
|
protected void |
logOpen()
Deprecated.
|
protected void |
mkdir(RemoteFile dir)
Deprecated.
|
void |
open()
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.
|
protected void |
setAttributes(RemoteFile file)
Deprecated.
|
void |
setSession(com.jcraft.jsch.Session session)
Deprecated.
|
void |
setSftp(com.jcraft.jsch.ChannelSftp sftp)
Deprecated.
|
String |
toString(RemoteFile source)
Deprecated.
|
protected void |
validate(RemoteFile file,
boolean directoryIndicator)
Deprecated.
|
protected void |
waitForClosed(com.jcraft.jsch.ChannelExec exec,
long millis)
Deprecated.
|
public void open() throws IOException
open
in interface SecureChannel
IOException
public void close()
close
in interface SecureChannel
public Result executeCommand(String command)
executeCommand
in interface SecureChannel
public Result executeCommand(String command, String stdin)
executeCommand
in interface SecureChannel
public void executeNoWait(String command)
executeNoWait
in interface SecureChannel
protected InputStream getInputStream(String s, String encoding)
protected void waitForClosed(com.jcraft.jsch.ChannelExec exec, long millis)
public RemoteFile getWorkingDirectory()
getWorkingDirectory
in interface SecureChannel
protected void logOpen()
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() throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchException
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 void copyFile(File source, RemoteFile destination)
copyFile
in interface SecureChannel
public void copyFileToDirectory(File source, RemoteFile directory)
copyFileToDirectory
in interface SecureChannel
public void copyLocationToFile(String location, RemoteFile destination)
copyLocationToFile
in interface SecureChannel
public void copyStringToFile(String string, RemoteFile destination)
copyStringToFile
in interface SecureChannel
public String toString(RemoteFile source)
toString
in interface SecureChannel
public void copyInputStreamToFile(InputStream source, RemoteFile destination)
copyInputStreamToFile
in interface SecureChannel
protected String getAbsolutePath(String absolutePath, String filename)
public void copyLocationToDirectory(String location, RemoteFile directory)
copyLocationToDirectory
in interface SecureChannel
public void copyFile(RemoteFile source, File destination)
copyFile
in interface SecureChannel
public void copyRemoteFile(String absolutePath, OutputStream out) throws IOException
copyRemoteFile
in interface SecureChannel
IOException
public void copyFile(RemoteFile source, OutputStream out) throws IOException
copyFile
in interface SecureChannel
IOException
public void copyFileToDirectory(RemoteFile source, File destination)
copyFileToDirectory
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)
public com.jcraft.jsch.Session getSession()
public void setSession(com.jcraft.jsch.Session session)
public com.jcraft.jsch.ChannelSftp getSftp()
public void setSftp(com.jcraft.jsch.ChannelSftp sftp)
public File getKnownHosts()
public boolean isUseConfigFile()
public boolean isIncludeDefaultPrivateKeyLocations()
public boolean isStrictHostKeyChecking()
public int getPort()
getPort
in interface SecureChannel
public int getWaitForClosedSleepMillis()
public String getEncoding()
public String getUsername()
getUsername
in interface SecureChannel
public String getHostname()
getHostname
in interface SecureChannel
public com.google.common.base.Optional<Integer> getConnectTimeout()
public List<File> getPrivateKeys()
public List<String> getPrivateKeyStrings()
public Properties getOptions()
Copyright © 2010–2014 The Kuali Foundation. All rights reserved.