|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.sftp.SftpConfiguration
public class SftpConfiguration
The SFTP configuration. Holds various SFTP-specific parameters. Also provides access to all SSH stack configurations objects.
Nested Class Summary | |
---|---|
static class |
SftpConfiguration.SftpLogger
|
Field Summary | |
---|---|
static int |
USE_SERVER_VERSION
This value is used to create the client with the highest server version supported. |
Constructor Summary | |
---|---|
SftpConfiguration()
Register known clients. |
|
SftpConfiguration(SshConfiguration sshConfig)
Initialize SftpConfiguration with a configured instance of SshConfiguration |
Method Summary | |
---|---|
void |
addClientVersion(int version,
java.lang.Class clientClass)
Adds a new client version to the factory. |
boolean |
containsClientVersion(int version)
Checks if the specified version is registered. |
SftpClient |
createClient(ConnectionParameters conParams,
User user)
Creates a new SFTP client instance for specified connection and user parameters. |
SftpConfiguration.SftpLogger |
createLogger()
Creates and returns logger. |
java.util.Map |
getExtensions()
Obtains the current server extensions. |
JFileSystem |
getFileSystem()
Obtains the current file system. |
Logger.Level |
getLoggerLevel()
Returns current logger level. |
java.io.PrintStream |
getLoggerStream()
Returns logger stream. |
int |
getPacketSize()
Returns the current connection channel max packet size. |
java.lang.String |
getServerCharset()
Returns server charset name. |
SshConfiguration |
getSshConfiguration()
Returns SSH configuration. |
int |
getTargetClientVersion()
Returns the current client version to create. |
boolean |
getUseAdaptiveConnection()
Returns adaptive connection flag |
long |
getWindowSize()
Returns the current connection channel initial window size. |
java.lang.String |
getWorkingDirectory()
Returns the current working directory. |
boolean |
isStartSubsystemReplyNeeded()
|
void |
removeClientVersion(int version)
Removes client version from the factory. |
void |
setExtensions(java.util.Map extensions)
Sets the current server extensions. |
void |
setFileSystem(JFileSystem fileSystem)
Sets the current file system. |
void |
setLoggerLevel(Logger.Level loggerLevel)
Sets the logger level for SFTP and SSH. |
void |
setLoggerStream(java.io.PrintStream loggerStream)
Sets the logger stream for SFTP and SSH. |
void |
setPacketSize(int packetSize)
Sets the current connection channel max packet size. |
void |
setServerCharset(java.lang.String value)
Sets server charset name. |
void |
setSshConfig(SshConfiguration sshConfig)
|
void |
setStartSubsystemReplyNeeded(boolean value)
|
void |
setTargetClientVersion(int version)
Sets the current client version to create. |
void |
setUseAdaptiveConnection(boolean useAdaptiveConnection)
Sets adaptive connection flag. |
void |
setWindowSize(int windowSize)
Sets the current connection channel initial window size. |
void |
setWorkingDir(java.lang.String workingDir)
Sets the current working directory. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int USE_SERVER_VERSION
Constructor Detail |
---|
public SftpConfiguration(SshConfiguration sshConfig)
sshConfig
- public SftpConfiguration()
Method Detail |
---|
public Logger.Level getLoggerLevel()
public void setLoggerLevel(Logger.Level loggerLevel)
loggerLevel
- the logger levelpublic java.io.PrintStream getLoggerStream()
public void setLoggerStream(java.io.PrintStream loggerStream)
loggerStream
- the logger streampublic SftpConfiguration.SftpLogger createLogger()
public SshConfiguration getSshConfiguration()
public void setSshConfig(SshConfiguration sshConfig)
sshConfig
- public java.lang.String getWorkingDirectory()
public void setWorkingDir(java.lang.String workingDir)
workingDir
- the current working directorypublic JFileSystem getFileSystem()
public void setFileSystem(JFileSystem fileSystem)
fileSystem
- the current file systempublic java.util.Map getExtensions()
public void setExtensions(java.util.Map extensions)
extensions
- the current server extensionspublic long getWindowSize()
public void setWindowSize(int windowSize)
windowSize
- the current connection channel initial window sizepublic int getPacketSize()
public void setPacketSize(int packetSize)
packetSize
- the current connection channel max packet sizepublic void addClientVersion(int version, java.lang.Class clientClass)
version
- client versionclientClass
- client classpublic void removeClientVersion(int version)
version
- version to removepublic boolean containsClientVersion(int version)
version
- target system version
true
if version is registered; false
otherwisepublic boolean getUseAdaptiveConnection()
true
if adaptive connection should be taken in usepublic void setUseAdaptiveConnection(boolean useAdaptiveConnection)
useAdaptiveConnection
- if true
adaptive connection will be usedpublic java.lang.String getServerCharset()
public void setServerCharset(java.lang.String value)
value
- server charset namepublic boolean isStartSubsystemReplyNeeded()
public void setStartSubsystemReplyNeeded(boolean value)
public SftpClient createClient(ConnectionParameters conParams, User user) throws SftpException
conParams
- connection parametersuser
- user parameters
SftpException
- if an I/O error occuredpublic int getTargetClientVersion()
public void setTargetClientVersion(int version)
version
- current client version to create
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |