com.sshtools.common.configuration
Class SshToolsConnectionProfile

java.lang.Object
  extended by com.sshtools.j2ssh.configuration.SshConnectionProperties
      extended by com.sshtools.common.configuration.SshToolsConnectionProfile

public class SshToolsConnectionProfile
extends SshConnectionProperties

Version:
$Revision: 1.1 $
Author:
$author$

Nested Class Summary
private  class SshToolsConnectionProfile.XMLHandler
           
 
Field Summary
private  boolean allowAgentForwarding
           
private  java.util.Map applicationProperties
           
private  java.util.Map authMethods
           
private  java.lang.String connectionFile
           
private  java.lang.String currentAuthentication
           
private  java.lang.String currentElement
           
private  java.util.Properties currentProperties
           
private  boolean disconnectOnSessionClose
           
static int DO_NOTHING
           
static int EXECUTE_COMMANDS
           
private  java.lang.String executeCommands
           
private static org.apache.commons.logging.Log log
           
private  int onceAuthenticated
           
private  boolean requestPseudoTerminal
           
private  java.util.Map sftpFavorites
           
static int START_SHELL
           
 
Fields inherited from class com.sshtools.j2ssh.configuration.SshConnectionProperties
forwardingAutoStart, host, localForwardings, port, prefDecryption, prefEncryption, prefKex, prefPK, prefRecvComp, prefRecvMac, prefSendComp, prefSendMac, proxyHostname, proxyPassword, proxyPort, proxyUsername, remoteForwardings, transportProvider, USE_HTTP_PROXY, USE_SOCKS4_PROXY, USE_SOCKS5_PROXY, USE_STANDARD_SOCKET, username
 
Constructor Summary
SshToolsConnectionProfile()
          Creates a new SshToolsConnectionProfile object.
 
Method Summary
 void addAuthenticationMethod(SshAuthenticationClient method)
           
 void addLocalForwarding(ForwardingConfiguration config)
           
 void addRemoteForwarding(ForwardingConfiguration config)
           
 void clearAuthenticationCache()
           
 boolean disconnectOnSessionClose()
           
 boolean getAllowAgentForwarding()
           
 java.lang.String getApplicationProperty(java.lang.String name, java.lang.String defaultValue)
           
 boolean getApplicationPropertyBoolean(java.lang.String name, boolean defaultValue)
           
 java.awt.Color getApplicationPropertyColor(java.lang.String name, java.awt.Color defaultColor)
           
 int getApplicationPropertyInt(java.lang.String name, int defaultValue)
           
 java.util.Map getAuthenticationMethods()
           
 java.lang.String getCommandsToExecute()
           
 int getOnceAuthenticatedCommand()
           
 java.util.Map getSftpFavorites()
           
 void open(java.io.File file)
           
 void open(java.io.InputStream in)
           
 void open(java.lang.String file)
           
 void removeAuthenticaitonMethod(java.lang.String method)
           
 void removeAuthenticationMethods()
           
 void removeLocalForwarding(java.lang.String name)
           
 void removeRemoteForwarding(java.lang.String name)
           
 boolean requiresPseudoTerminal()
           
 void save()
           
 void save(java.lang.String file)
           
 void setAllowAgentForwarding(boolean allowAgentForwarding)
           
 void setApplicationProperty(java.lang.String name, boolean value)
           
 void setApplicationProperty(java.lang.String name, java.awt.Color value)
           
 void setApplicationProperty(java.lang.String name, int value)
           
 void setApplicationProperty(java.lang.String name, java.lang.String value)
           
 void setCommandsToExecute(java.lang.String executeCommands)
           
 void setDisconnectOnSessionClose(boolean disconnectOnSessionClose)
           
 void setOnceAuthenticatedCommand(int onceAuthenticated)
           
 void setRequiresPseudoTerminal(boolean requiresPseudoTerminal)
           
 void setSftpFavorite(java.lang.String name, java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class com.sshtools.j2ssh.configuration.SshConnectionProperties
getForwardingAutoStartMode, getHost, getLocalForwardings, getPort, getPrefCSComp, getPrefCSEncryption, getPrefCSMac, getPrefKex, getPrefPublicKey, getPrefSCComp, getPrefSCEncryption, getPrefSCMac, getProxyHost, getProxyPassword, getProxyPort, getProxyUsername, getRemoteForwardings, getTransportProvider, getTransportProviderString, getUsername, removeAllForwardings, setForwardingAutoStartMode, setHost, setPort, setPrefCSComp, setPrefCSEncryption, setPrefCSMac, setPrefKex, setPrefPublicKey, setPrefSCComp, setPrefSCEncryption, setPrefSCMac, setProxyHost, setProxyPassword, setProxyPort, setProxyUsername, setTransportProvider, setTransportProviderString, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

DO_NOTHING

public static final int DO_NOTHING
See Also:
Constant Field Values

START_SHELL

public static final int START_SHELL
See Also:
Constant Field Values

EXECUTE_COMMANDS

public static final int EXECUTE_COMMANDS
See Also:
Constant Field Values

applicationProperties

private java.util.Map applicationProperties

sftpFavorites

private java.util.Map sftpFavorites

authMethods

private java.util.Map authMethods

requestPseudoTerminal

private boolean requestPseudoTerminal

disconnectOnSessionClose

private boolean disconnectOnSessionClose

onceAuthenticated

private int onceAuthenticated

executeCommands

private java.lang.String executeCommands

allowAgentForwarding

private boolean allowAgentForwarding

currentElement

private java.lang.String currentElement

currentAuthentication

private java.lang.String currentAuthentication

currentProperties

private java.util.Properties currentProperties

connectionFile

private java.lang.String connectionFile
Constructor Detail

SshToolsConnectionProfile

public SshToolsConnectionProfile()
Creates a new SshToolsConnectionProfile object.

Method Detail

getAuthenticationMethods

public java.util.Map getAuthenticationMethods()
Returns:

requiresPseudoTerminal

public boolean requiresPseudoTerminal()
Returns:

disconnectOnSessionClose

public boolean disconnectOnSessionClose()
Returns:

setRequiresPseudoTerminal

public void setRequiresPseudoTerminal(boolean requiresPseudoTerminal)
Parameters:
requiresPseudoTerminal -

setDisconnectOnSessionClose

public void setDisconnectOnSessionClose(boolean disconnectOnSessionClose)
Parameters:
disconnectOnSessionClose -

clearAuthenticationCache

public void clearAuthenticationCache()

setOnceAuthenticatedCommand

public void setOnceAuthenticatedCommand(int onceAuthenticated)
Parameters:
onceAuthenticated -

getOnceAuthenticatedCommand

public int getOnceAuthenticatedCommand()
Returns:

setCommandsToExecute

public void setCommandsToExecute(java.lang.String executeCommands)
Parameters:
executeCommands -

getCommandsToExecute

public java.lang.String getCommandsToExecute()
Returns:

getApplicationProperty

public java.lang.String getApplicationProperty(java.lang.String name,
                                               java.lang.String defaultValue)
Parameters:
name -
defaultValue -
Returns:

getSftpFavorites

public java.util.Map getSftpFavorites()
Parameters:
name -
defaultValue -
Returns:

setSftpFavorite

public void setSftpFavorite(java.lang.String name,
                            java.lang.String value)
Parameters:
name -
defaultValue -

getApplicationPropertyInt

public int getApplicationPropertyInt(java.lang.String name,
                                     int defaultValue)
Parameters:
name -
defaultValue -
Returns:

getApplicationPropertyBoolean

public boolean getApplicationPropertyBoolean(java.lang.String name,
                                             boolean defaultValue)
Parameters:
name -
defaultValue -
Returns:

getApplicationPropertyColor

public java.awt.Color getApplicationPropertyColor(java.lang.String name,
                                                  java.awt.Color defaultColor)
Parameters:
name -
defaultColor -
Returns:

setApplicationProperty

public void setApplicationProperty(java.lang.String name,
                                   java.lang.String value)
Parameters:
name -
value -

setApplicationProperty

public void setApplicationProperty(java.lang.String name,
                                   int value)
Parameters:
name -
value -

setApplicationProperty

public void setApplicationProperty(java.lang.String name,
                                   boolean value)
Parameters:
name -
value -

setApplicationProperty

public void setApplicationProperty(java.lang.String name,
                                   java.awt.Color value)
Parameters:
name -
value -

addAuthenticationMethod

public void addAuthenticationMethod(SshAuthenticationClient method)
Parameters:
method -

addLocalForwarding

public void addLocalForwarding(ForwardingConfiguration config)
Overrides:
addLocalForwarding in class SshConnectionProperties
Parameters:
config -

addRemoteForwarding

public void addRemoteForwarding(ForwardingConfiguration config)
Overrides:
addRemoteForwarding in class SshConnectionProperties
Parameters:
config -

getAllowAgentForwarding

public boolean getAllowAgentForwarding()
Returns:

setAllowAgentForwarding

public void setAllowAgentForwarding(boolean allowAgentForwarding)
Parameters:
allowAgentForwarding -

removeLocalForwarding

public void removeLocalForwarding(java.lang.String name)
Parameters:
name -

removeRemoteForwarding

public void removeRemoteForwarding(java.lang.String name)
Parameters:
name -

open

public void open(java.lang.String file)
          throws InvalidProfileFileException
Parameters:
file -
Throws:
InvalidProfileFileException

open

public void open(java.io.File file)
          throws InvalidProfileFileException
Parameters:
file -
Throws:
InvalidProfileFileException

open

public void open(java.io.InputStream in)
          throws InvalidProfileFileException
Parameters:
in -
Throws:
InvalidProfileFileException

removeAuthenticaitonMethod

public void removeAuthenticaitonMethod(java.lang.String method)
Parameters:
method -

removeAuthenticationMethods

public void removeAuthenticationMethods()

save

public void save(java.lang.String file)
          throws InvalidProfileFileException
Parameters:
file -
Throws:
InvalidProfileFileException

save

public void save()
          throws InvalidProfileFileException
Throws:
InvalidProfileFileException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns: