jhomenet.shell.test
Class TestShell

java.lang.Object
  extended by jhomenet.shell.Shell
      extended by jhomenet.shell.test.TestShell

public class TestShell
extends Shell


Field Summary
static java.lang.String SHELL_NAME
          Define the shell name.
static java.lang.String SHELL_VERSION
          Shell version.
 
Fields inherited from class jhomenet.shell.Shell
environment
 
Method Summary
 void enableLocalConsole(boolean enableConsole)
          (non-Javadoc)
 void execute(java.lang.Object[] commandLine, SystemInputStream in, SystemPrintStream out, SystemPrintStream err, java.util.HashMap env)
          (non-Javadoc)
 java.util.HashMap getCurrentEnvironment()
          (non-Javadoc)
 java.lang.String getFromCurrentEnvironment(java.lang.String key)
          (non-Javadoc)
static TestShell getInstance()
           
 java.lang.String getName()
          (non-Javadoc)
 java.lang.String getVersion()
          (non-Javadoc)
protected  void initializeShellCommands()
          Initialize the shell commands.
 int login(java.lang.String userName, java.lang.String password)
          (non-Javadoc)
 void logout(java.lang.Object info)
          (non-Javadoc)
 void startServers()
           
 
Methods inherited from class jhomenet.shell.Shell
getSystemEnvironment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHELL_VERSION

public static java.lang.String SHELL_VERSION
Shell version.


SHELL_NAME

public static java.lang.String SHELL_NAME
Define the shell name.

Method Detail

getInstance

public static TestShell getInstance()

initializeShellCommands

protected void initializeShellCommands()
Initialize the shell commands.

Specified by:
initializeShellCommands in class Shell

enableLocalConsole

public void enableLocalConsole(boolean enableConsole)
(non-Javadoc)

Specified by:
enableLocalConsole in class Shell
See Also:
Shell.enableLocalConsole(boolean)

login

public int login(java.lang.String userName,
                 java.lang.String password)
(non-Javadoc)

Specified by:
login in class Shell
Parameters:
userName - the user location of the user logging in
password - the password for this user
Returns:
the user ID of the newly logged in user, or -1 if the userName password combination was not correct
See Also:
Shell.login(java.lang.String, java.lang.String)

logout

public void logout(java.lang.Object info)
(non-Javadoc)

Specified by:
logout in class Shell
Parameters:
info - any extra information needed in the logout process
See Also:
Shell.logout(java.lang.Object)

getName

public java.lang.String getName()
(non-Javadoc)

Specified by:
getName in class Shell
Returns:
the location of the shell
See Also:
Shell.getName()

getVersion

public java.lang.String getVersion()
(non-Javadoc)

Specified by:
getVersion in class Shell
Returns:
the shell version
See Also:
Shell.getVersion()

getCurrentEnvironment

public java.util.HashMap getCurrentEnvironment()
(non-Javadoc)

Specified by:
getCurrentEnvironment in class Shell
Returns:
the properties
See Also:
Shell.getCurrentEnvironment()

getFromCurrentEnvironment

public java.lang.String getFromCurrentEnvironment(java.lang.String key)
(non-Javadoc)

Specified by:
getFromCurrentEnvironment in class Shell
Parameters:
key - the key to lookup in the current properties
Returns:
the value of the key, or null if the key is not set in the current properties
See Also:
Shell.getFromCurrentEnvironment(java.lang.String)

execute

public void execute(java.lang.Object[] commandLine,
                    SystemInputStream in,
                    SystemPrintStream out,
                    SystemPrintStream err,
                    java.util.HashMap env)
             throws java.lang.Exception
(non-Javadoc)

Specified by:
execute in class Shell
Parameters:
commandLine - an Object array containing the command in the first element, followed by any parameters need for that command in a String[] in the second element
in - the stream the command will use to get input
out - the stream used to report non-critical messages
err - the stream used to report critical messages
env - a windDirectionTable of properties variables
Throws:
java.lang.Exception - any exception raised by the command
See Also:
Shell.execute(java.lang.Object[], jhomenet.shell.server.SystemInputStream, jhomenet.shell.server.SystemPrintStream, jhomenet.shell.server.SystemPrintStream, java.util.HashMap)

startServers

public void startServers()


Copyright © 2004-2005 David Irwin. All Rights Reserved.