Package adams.scripting.connection
Class ScpConnection
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,SSHSessionProvider,OptionHandler,PasswordSupporter,QuickInfoSupporter,SizeOfHandler,Connection,Serializable,Comparable<Connection>
public class ScpConnection extends AbstractSSHConnection
Copies the command as file to the remote host into the specified directory.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.scripting.connection.AbstractSSHConnection
AbstractSSHConnection.TrustAll
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_RemoteDirthe remote directory.-
Fields inherited from class adams.scripting.connection.AbstractSSHConnection
m_AssignedPort, m_AuthenticationType, m_Host, m_KnownHosts, m_Password, m_Port, m_PrivateKeyFile, m_PrivateKeyPassphrase, m_Session, m_StrictHostKeyChecking, m_User
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ScpConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected StringdoSend(RemoteCommand cmd, RemoteCommandProcessor processor, boolean request)Sends the command to the specified sscripting engine.StringgetRemoteDir()Returns the remote directory to copy the command file to.StringglobalInfo()Returns a string describing the object.StringremoteDirTipText()Returns the tip text for this property.voidsetRemoteDir(String value)Sets the remote directory to copy the command file to.-
Methods inherited from class adams.scripting.connection.AbstractSSHConnection
authenticationTypeTipText, cleanUp, createSession, doSendRequest, doSendResponse, getAuthenticationType, getHost, getKnownHosts, getPassword, getPort, getPrivateKeyFile, getPrivateKeyPassphrase, getQuickInfo, getSession, getStrictHostKeyChecking, getUser, hostTipText, knownHostsTipText, newSession, newSession, passwordTipText, portTipText, privateKeyFileTipText, privateKeyPassphraseTipText, reset, send, setAuthenticationType, setHost, setKnownHosts, setPassword, setPort, setPrivateKeyFile, setPrivateKeyPassphrase, setStrictHostKeyChecking, setUser, strictHostKeyCheckingTipText, userTipText
-
Methods inherited from class adams.scripting.connection.AbstractConnection
checkRequest, checkResponse, compareTo, equals, sendRequest, sendResponse, toString
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_RemoteDir
protected String m_RemoteDir
the remote directory.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractSSHConnection
-
setRemoteDir
public void setRemoteDir(String value)
Sets the remote directory to copy the command file to.- Parameters:
value- the directory
-
getRemoteDir
public String getRemoteDir()
Returns the remote directory to copy the command file to.- Returns:
- the directory
-
remoteDirTipText
public String remoteDirTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doSend
protected String doSend(RemoteCommand cmd, RemoteCommandProcessor processor, boolean request)
Sends the command to the specified sscripting engine.- Specified by:
doSendin classAbstractSSHConnection- Parameters:
cmd- the command to sendprocessor- for formatting/parsingrequest- whether Request or Response- Returns:
- null if successfully sent, otherwise error message
-
-