Client Request Step Through old - rsanchez-wsu/jfiles GitHub Wiki

JFilesServerThread.run()

  1. Read in a transmission from the client in the UTF format.
  2. Send it to the handle method of the server object. Note that although a method of the server object is called the clients thread is used. The method has the synchronized keyword so that wo commands are ton executed at the same time.

##JFilesServer.handle()

  1. Get the user directory.
  2. Open files to store command history.
  3. Get up to space marker in the line read in. This is the command.
  4. Record Command in the command history.
  5. Checxk if this is a valid command and return an error to the client if not.
  6. Use a switch to execute the appropriate command.