|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hw6.TransitSystem
This class builds and manages the transit system for homework 6.
Constructor Summary | |
TransitSystem(java.lang.String hostname,
int port)
Create a set of buses for this transit system. |
Method Summary | |
void |
dataReceived(hw6.TransitBusEvent evt)
This method is called every time a new bus information data record arrives. |
java.util.ArrayList |
getBusList()
Create a list of all the buses in the system. |
void |
start()
This method is called to start the system operating. |
void |
stop()
This method is called to stop the system operating. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TransitSystem(java.lang.String hostname, int port) throws java.io.IOException
hostname
- the network host that is supplying the dataport
- the port that the data is being read fromMethod Detail |
public void start() throws java.io.IOException
java.io.IOException
- in the event of a connection failurepublic void stop()
public void dataReceived(hw6.TransitBusEvent evt)
dataReceived
in interface TransitBusListener
evt
- the TransitBusEvent that describes what happenedpublic java.util.ArrayList getBusList()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |