cscie160.hw4
Class Server

java.lang.Object
  |
  +--cscie160.hw4.Server

public class Server
extends java.lang.Object


Constructor Summary
Server(int mPort)
          | Constructor.
 
Method Summary
 void closeServer()
          | Ensure Server closed smoothly
 void listen()
          | Loop while listening to Client.
static void main(java.lang.String[] argv)
          | Read args passed to main(), and trigger Server to be opened.
 void openServer()
          | Ensure server is opened smoothly.
 Cmd parseLine(java.lang.String mLine)
          | Parse the command lone into the command name and args Commands are sent in the format "methodName(args)" Much like a Java method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server(int mPort)
| Constructor. Initialize port number and the ATM Imp. Sends the calls to open the Server, listen and close.
Parameters:
int - Port number this server listens to.
Method Detail

openServer

public void openServer()
| Ensure server is opened smoothly.

listen

public void listen()
| Loop while listening to Client.

parseLine

public Cmd parseLine(java.lang.String mLine)
| Parse the command lone into the command name and args Commands are sent in the format "methodName(args)" Much like a Java method. Later, reflection might be used to trigger command/methods.
Returns:
Cmd Cmd object that represents method to be called.

closeServer

public void closeServer()
| Ensure Server closed smoothly

main

public static void main(java.lang.String[] argv)
| Read args passed to main(), and trigger Server to be opened.
Parameters:
argv - Elevator object stopping at this floor.