|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.dalsemi.shell.TINIShell
|
+--com.dalsemi.shell.DefaultTINIShell
The default implementation of a TINIShell. In this shell, all users are assigned the
same UID and user name, and all are given adminstrator privileges. This shell has no
commands associated with it. For an example of a complete implementation of a TINIShell,
see the slush shell that is included with the TINI distribution files.
| Fields inherited from class com.dalsemi.shell.TINIShell |
adminUID,
environment |
| Constructor Summary | |
DefaultTINIShell()
Creates the initial environment for a shell. |
|
| Method Summary | |
void |
execute(java.lang.Object[] commandLine,
SystemInputStream in,
SystemPrintStream out,
SystemPrintStream err,
java.util.Hashtable env)
Executes a command in the shell. |
java.util.Hashtable |
getCurrentEnvironment()
Returns a copy of the current environment. |
byte |
getCurrentUID()
Returns the user ID of the current user. |
java.lang.String |
getCurrentUserName()
Returns the name of the current user logged in. |
java.lang.String |
getFromCurrentEnvironment(java.lang.String key)
Gets the value of the given key from the current environment. |
java.lang.String |
getName()
Returns the name of the shell. |
int |
getUIDByUserName(java.lang.String username)
Returns the ID of the user with the given user name. |
java.lang.String |
getUserNameByUID(byte uid)
Returns the user name of the user with the given user ID. |
java.lang.String |
getVersion()
Returns the version of the shell. |
int |
login(java.lang.String userName,
java.lang.String password)
Logs a user into the system and sets that user's privilege level correctly. |
void |
logout(java.lang.Object info)
Does nothing in this implementation. |
| Methods inherited from class com.dalsemi.shell.TINIShell |
getSystemEnvironment,
isAdmin,
isCurrentUserAdmin |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public DefaultTINIShell()
| Method Detail |
public java.lang.String getName()
public java.lang.String getVersion()
public int login(java.lang.String userName,
java.lang.String password)
userName - the user name of the user logging inpassword - the password for this userpublic void logout(java.lang.Object info)
info - any extra information needed in the logout processpublic byte getCurrentUID()
public java.lang.String getUserNameByUID(byte uid)
uid - The uid to checkpublic int getUIDByUserName(java.lang.String username)
username - the username to checkpublic java.lang.String getCurrentUserName()
public java.util.Hashtable getCurrentEnvironment()
public java.lang.String getFromCurrentEnvironment(java.lang.String key)
key - the key to lookup in the current environment
public void execute(java.lang.Object[] commandLine,
SystemInputStream in,
SystemPrintStream out,
SystemPrintStream err,
java.util.Hashtable env)
throws java.lang.Exception
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 elementin - the stream the command will use to get inputout - the stream used to report non-critical messageserr - the stream used to report critical messagesenv - a table of environment variables
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||