Class EDU.gac.max.flip.NetInterface
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EDU.gac.max.flip.NetInterface

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----EDU.gac.max.flip.NetInterface

class NetInterface
extends Thread
This NetInteface class is used by NetFlip to provide the client-side network interface for communication with the FlipServer. It runs as a separate thread so that it can await network messages from the FlipServer concurrently with the user interface handling events like mouse clicks. (However the class boundaries do not correspond 100% with the thread boundaries: the user interface thread invokes this class's sendFlip method and the NetInteface thread invokes the main NetFlip class's localFlip method -- that's how a user interface action can trigger a network message or a network message can trigger a user interface display.)

Warning: this NetInterface class may be missing some synchronized keywords on some methods -- either it or NetFlip is. This is intentional as part of a lab assignment on race conditions and monitors for the MC78 course. The students are supposed to find the race conditions and predict the buggy behavior that can result, then verify by inserting appropriate sleeps, then fix the problem by adding the needed synchronized keywords. So, either this class or the other class in this source file (NetFlip) is known to be buggy.

Written 17 Aug 1996 by Max Hailperin <max@gac.edu>

See Also:
FlipServer, NetFlip

This class is not public and can therefore cannot be used outside this package.


All Packages  Class Hierarchy  This Package  Previous  Next  Index