edu.iastate.jtm.util
Class RemoteControl

java.lang.Object
  extended by edu.iastate.jtm.util.RemoteControl
All Implemented Interfaces:
com.jcraft.jsch.UserInfo

public class RemoteControl
extends java.lang.Object
implements com.jcraft.jsch.UserInfo

Author:
Jing Ding MiamExpress

Constructor Summary
RemoteControl()
           
RemoteControl(java.lang.String user, java.lang.String host, java.lang.String pass)
           
 
Method Summary
 void addRemoteReceiver(RemoteReceiver rr)
           
 void execute(java.lang.String command)
           
 void execute(java.lang.String[] batch)
           
 java.lang.String getHost()
           
 java.lang.String getPass()
           
 java.lang.String getPassphrase()
           
 java.lang.String getPassword()
           
 java.lang.String getUser()
           
 boolean promptPassphrase(java.lang.String message)
           
 boolean promptPassword(java.lang.String message)
           
 boolean promptYesNo(java.lang.String message)
           
 void removeRemoteReceiver(RemoteReceiver rr)
           
 void setHost(java.lang.String host)
           
 void setPass(java.lang.String pass)
           
 void setUser(java.lang.String user)
           
 void showMessage(java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteControl

public RemoteControl()

RemoteControl

public RemoteControl(java.lang.String user,
                     java.lang.String host,
                     java.lang.String pass)
Method Detail

addRemoteReceiver

public void addRemoteReceiver(RemoteReceiver rr)

removeRemoteReceiver

public void removeRemoteReceiver(RemoteReceiver rr)

execute

public void execute(java.lang.String command)
             throws com.jcraft.jsch.JSchException,
                    java.io.IOException
Throws:
com.jcraft.jsch.JSchException
java.io.IOException

execute

public void execute(java.lang.String[] batch)
             throws com.jcraft.jsch.JSchException,
                    java.io.IOException
Throws:
com.jcraft.jsch.JSchException
java.io.IOException

getPassphrase

public java.lang.String getPassphrase()
Specified by:
getPassphrase in interface com.jcraft.jsch.UserInfo

getPassword

public java.lang.String getPassword()
Specified by:
getPassword in interface com.jcraft.jsch.UserInfo

showMessage

public void showMessage(java.lang.String message)
Specified by:
showMessage in interface com.jcraft.jsch.UserInfo

promptPassword

public boolean promptPassword(java.lang.String message)
Specified by:
promptPassword in interface com.jcraft.jsch.UserInfo

promptPassphrase

public boolean promptPassphrase(java.lang.String message)
Specified by:
promptPassphrase in interface com.jcraft.jsch.UserInfo

promptYesNo

public boolean promptYesNo(java.lang.String message)
Specified by:
promptYesNo in interface com.jcraft.jsch.UserInfo

getHost

public java.lang.String getHost()
Returns:
Returns the host.

setHost

public void setHost(java.lang.String host)
Parameters:
host - The host to set.

getPass

public java.lang.String getPass()
Returns:
Returns the pass.

setPass

public void setPass(java.lang.String pass)
Parameters:
pass - The pass to set.

getUser

public java.lang.String getUser()
Returns:
Returns the user.

setUser

public void setUser(java.lang.String user)
Parameters:
user - The user to set.