|
Cliser | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cliser.CommunicatorUser | +--cliser.ServiceThread
Constructor Summary | |
ServiceThread()
default constructor POST: my instance variables are set to default values. |
|
ServiceThread(ThreadManager aManager)
explicit constructor |
Method Summary | |
protected void |
awaitNextJob()
utility to put me to sleep until I'm given something to do PRE: I've finished providing a client with service. |
java.lang.Object |
clone()
method to clone myself (implements Cloneable interface) |
Communicator |
getCommunicator()
accessor for myCommunicator (overrides CommunicatorUser.getCommunicator()) |
ThreadManager |
getManager()
accessor for myManager |
java.lang.Thread |
getThread()
accessor for myThread |
int |
getThreadID()
accessor for myThreadID |
protected Communicator |
initCommunicator()
definition for CommunicatorUser.initCommunicator() |
abstract void |
interactWithClient()
method defined by subclass specifying thread's interaction with client PRE: A connection has been accepted. |
void |
run()
default behavior for a service thread: run forever, interacting with a client, and then sleeping. |
void |
setCommunicator(Communicator aCommunicator)
mutator for myCommunicator |
void |
setManager(ThreadManager manager)
mutator for myManager |
void |
setThread(java.lang.Thread aThread)
mutator for myThread |
protected void |
setThreadID()
myThreadID mutator POST: myThreadID == the entry value of numThreads && numThreads has been incremented. |
void |
start()
utility to wake me up (or start me the first time) POST: I am awake and working. |
java.lang.String |
toString()
String converter |
Methods inherited from class cliser.CommunicatorUser |
receive,
send |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ServiceThread()
public ServiceThread(ThreadManager aManager)
Method Detail |
protected void setThreadID()
public final int getThreadID()
public abstract void interactWithClient()
public void run()
protected void awaitNextJob()
public void start()
protected Communicator initCommunicator()
public Communicator getCommunicator()
public void setCommunicator(Communicator aCommunicator)
public final java.lang.Thread getThread()
public void setThread(java.lang.Thread aThread)
public final ThreadManager getManager()
public void setManager(ThreadManager manager)
public java.lang.Object clone()
public java.lang.String toString()
|
Cliser | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |