Class Juno

java.lang.Object
  |
  +--Juno

public class Juno
extends Object

Juno (Juno's Unix NOt) mimics a command line operating system like Unix.

A Juno system has a name, a set of Users, a JFile system, a login process and a set of shell commands.

Version:
6
See Also:
User, JFile, ShellCommand

Constructor Summary
Juno(String hostName, boolean echoInput)
          Construct a Juno (operating system) object.
 
Method Summary
 User createUser(String userName, Directory home, String realName)
          Create a new User.
 ShellCommandTable getCommandTable()
          The shell command table for this system.
 String getHostName()
          The name of the host computer on which this system is running.
 String getOS()
          The name of this operating system.
 Directory getUserHomes()
          The directory containing all user homes for this system.
 String getVersion()
          The version number for this system.
 User lookupUser(String username)
          Look up a user by user name.
static void main(String[] args)
          The Juno system may be given the following command line arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Juno

public Juno(String hostName,
            boolean echoInput)
Construct a Juno (operating system) object.

Parameters:
hostName - the name of the host on which it's running.
echoInput - should all input be echoed as output?
Method Detail

createUser

public User createUser(String userName,
                       Directory home,
                       String realName)
Create a new User.

Parameters:
userName - the User's login name.
home - her home Directory.
realName - her real name.
Returns:
newly created User.

getCommandTable

public ShellCommandTable getCommandTable()
The shell command table for this system.

Returns:
the shell command table.

getHostName

public String getHostName()
The name of the host computer on which this system is running.

Returns:
the host computer name.

getOS

public String getOS()
The name of this operating system.

Returns:
the operating system name.

getUserHomes

public Directory getUserHomes()
The directory containing all user homes for this system.

Returns:
the directory containing user homes.

getVersion

public String getVersion()
The version number for this system.

Returns:
the version number.

lookupUser

public User lookupUser(String username)
Look up a user by user name.

Parameters:
username - the user's name.
Returns:
the appropriate User object.

main

public static void main(String[] args)
The Juno system may be given the following command line arguments.

 -e:         Echo all input (useful for testing).

 -version:   Report the version number and exit.

 [hostname]: The name of the host on which
             Juno is running (optional).