net.smartlab.ssh
Class Shell

java.lang.Object
  extended by net.smartlab.ssh.Shell

public class Shell
extends java.lang.Object

This class represents a secure remote shell obtained through the SSH protocol.

Author:
gperrone, rlogiacco

Constructor Summary
Shell()
           
 
Method Summary
 void close()
          TODO documentation
 java.lang.String execute(java.lang.String command)
          TODO documentation
 java.lang.String getHost()
          Returns the host.
 java.lang.String getPassword()
          Returns the password.
 int getPort()
          Returns the port.
 long getTimeout()
          Returns the timeout.
 java.lang.String getUsername()
          Returns the username.
 java.lang.String interrupt()
          TODO documentation
 void open()
          TODO documentation
 void setHost(java.lang.String host)
          Sets the host.
 void setPassword(java.lang.String password)
          Sets the password.
 void setPort(int port)
          Sets the port.
 void setTimeout(long timeout)
          Sets the timeout.
 void setUsername(java.lang.String username)
          Sets the username.
 java.lang.String toString()
           
 java.lang.String update()
          TODO documentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Shell

public Shell()
Method Detail

getUsername

public java.lang.String getUsername()
Returns the username.

Returns:
the username.

setUsername

public void setUsername(java.lang.String username)
Sets the username.

Parameters:
username - the username to set.

getPassword

public java.lang.String getPassword()
Returns the password.

Returns:
the password.

setPassword

public void setPassword(java.lang.String password)
Sets the password.

Parameters:
password - the password to set.

getHost

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

Returns:
the host.

setHost

public void setHost(java.lang.String host)
Sets the host.

Parameters:
host - the host to set.

getPort

public int getPort()
Returns the port.

Returns:
the port.

setPort

public void setPort(int port)
Sets the port.

Parameters:
port - the port to set.

getTimeout

public long getTimeout()
Returns the timeout.

Returns:
the timeout.

setTimeout

public void setTimeout(long timeout)
Sets the timeout.

Parameters:
timeout - the timeout to set.

open

public void open()
          throws net.smartlab.web.BusinessException,
                 java.io.IOException
TODO documentation

Parameters:
host -
port -
username -
password -
Throws:
net.smartlab.web.BusinessException
java.io.IOException

update

public java.lang.String update()
                        throws java.io.IOException
TODO documentation

Returns:
Throws:
java.io.IOException

execute

public java.lang.String execute(java.lang.String command)
                         throws java.io.IOException
TODO documentation

Parameters:
command -
Returns:
Throws:
java.io.IOException

interrupt

public java.lang.String interrupt()
                           throws java.io.IOException
TODO documentation

Returns:
Throws:
java.io.IOException

close

public void close()
TODO documentation


toString

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


Copyright © 2007-2008 The SmartShell Team. All Rights Reserved.