Java Reference
In-Depth Information
4-5. Once you have read Chapter 5, you may want to come back to this chapter to
try this exercise. The Server class of Chapter 5 is a multithreaded, multiser-
vice network server. It demonstrates important networking techniques, but it
also makes heavy use of threads. One particular feature of this program is
that it creates a ThreadGroup to contain all the threads it creates. Modify
Server so that in addition to creating this one master thread group, it also
creates a nested thread group for each of the individual services it provides.
Place the thread for each individual client connection within the thread group
for its service. Also, modify the program so that each service can have a
thread priority specified and use this priority value when creating connection
threads. You will probably want to store the thread group and priority for
each service as fields of the nested Listener class.
Search WWH ::




Custom Search