uk.ac.cam.juliet.twitter.main
Class Program.UserThread

java.lang.Object
  extended by java.lang.Thread
      extended by uk.ac.cam.juliet.twitter.main.Program.UserThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Program

private static class Program.UserThread
extends java.lang.Thread

This represents a thread that is responsible for reading input commands from the user dynamically and changing the behaviour of the program on the fly
input commands include changing how many days should the tweets remain in the DB, adding more swear words and shutting the server down gracefully

Author:
Ahmad Akra

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  IDatabase db
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Program.UserThread()
           
 
Method Summary
private  void printHelp()
          prints a small help manual to assist the user into dynamically interact with the server
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

db

IDatabase db
Constructor Detail

Program.UserThread

public Program.UserThread()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

printHelp

private void printHelp()
prints a small help manual to assist the user into dynamically interact with the server