|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sshtools.j2ssh.configuration.SshConnectionProperties
Represents an SSH connection. An instance of this class is passed to the connect methods of the transport protocol. It specifies all the preferred algorithms and methods
Constructor Summary | |
SshConnectionProperties()
Constructor for the SshConnectionProperties object |
|
SshConnectionProperties(java.lang.String host,
java.lang.String username)
Constructor for the SshConnectionProperties object |
Method Summary | |
void |
addAuthenticationMethod(java.lang.String method)
Adds and authentication method to the properties. |
java.util.List |
getAuthenticationMethods()
Gets the list of authentication methods for this connection |
java.lang.String |
getHost()
Gets the host name for the connection |
int |
getPort()
Gets the port for this connection |
java.lang.String |
getPrefCSComp()
Gets the preferred client->server compression |
java.lang.String |
getPrefCSEncryption()
Gets the preferred client->server encryption method for the connection |
java.lang.String |
getPrefCSMac()
Gets the preferred client->server message authentication |
java.lang.String |
getPrefKex()
Gets the preferred key exchange method |
java.lang.String |
getPrefPublicKey()
Gets the preferred public key mechanism |
java.lang.String |
getPrefSCComp()
Gets the preferred server->client compression |
java.lang.String |
getPrefSCEncryption()
Gets the preferred server->client encryption for the conneciton |
java.lang.String |
getPrefSCMac()
Gets the preferred server->client message authentication |
java.lang.String |
getTerminalType()
Gets the terminal type |
java.lang.String |
getUsername()
Gets the username for the connection |
void |
open(java.lang.String file)
Opens a connection file and loads the properties ready for connection |
void |
removeAuthenticaitonMethod(java.lang.String method)
Removes an authentication method |
void |
save(java.lang.String file)
Call this method to save the connection properties to file |
void |
setHost(java.lang.String host)
Sets the host name for this connection |
void |
setPort(int port)
Sets the port for the connection |
void |
setPrefCSComp(java.lang.String pref)
Sets the preferred client->server compression |
void |
setPrefCSEncryption(java.lang.String pref)
Sets the prefEncryption attribute of the SshConnectionProperties object |
void |
setPrefCSMac(java.lang.String pref)
Sets the preferred client->server message authentication |
void |
setPrefKex(java.lang.String pref)
Sets the preferred key exchange for the connection |
void |
setPrefPublicKey(java.lang.String pref)
Sets the preferred public key mechanism |
void |
setPrefSCComp(java.lang.String pref)
Sets the preferred server->client compression |
void |
setPrefSCEncryption(java.lang.String pref)
Sets the preferred server->client encryption for the connection |
void |
setPrefSCMac(java.lang.String pref)
Sets the preferred server->client message authentication |
void |
setTerminalType(java.lang.String term)
Sets the terminal type |
void |
setUsername(java.lang.String username)
Sets the username for the connection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SshConnectionProperties(java.lang.String host, java.lang.String username)
host
- The host to connect tousername
- The name of the userpublic SshConnectionProperties()
Method Detail |
public void open(java.lang.String file) throws InvalidConnectionFileException
file
- The full path to the file
InvalidConnectionFileException
- Thrown if the file is not a valid
connection filepublic void save(java.lang.String file) throws InvalidConnectionFileException
file
- The file to save to
InvalidConnectionFileException
public void addAuthenticationMethod(java.lang.String method)
method
- The method name to addpublic void removeAuthenticaitonMethod(java.lang.String method)
method
- public java.util.List getAuthenticationMethods()
public void setTerminalType(java.lang.String term)
term
- public java.lang.String getTerminalType()
public java.lang.String getHost()
public int getPort()
public void setHost(java.lang.String host)
host
- The new host valuepublic void setUsername(java.lang.String username)
username
- public void setPort(int port)
port
- The new port valuepublic java.lang.String getUsername()
public java.lang.String getPrefCSEncryption()
public void setPrefKex(java.lang.String pref)
pref
- public void setPrefCSEncryption(java.lang.String pref)
pref
- The method namepublic java.lang.String getPrefSCEncryption()
public void setPrefSCEncryption(java.lang.String pref)
pref
- The method namepublic java.lang.String getPrefCSMac()
public void setPrefCSMac(java.lang.String pref)
pref
- The new prefCSMac valuepublic java.lang.String getPrefSCMac()
public void setPrefSCMac(java.lang.String pref)
pref
- The new prefSCMac valuepublic java.lang.String getPrefCSComp()
public void setPrefCSComp(java.lang.String pref)
pref
- The new prefCSComp valuepublic java.lang.String getPrefSCComp()
public void setPrefSCComp(java.lang.String pref)
pref
- The new prefSCComp valuepublic java.lang.String getPrefPublicKey()
public void setPrefPublicKey(java.lang.String pref)
pref
- The method namepublic java.lang.String getPrefKex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |