|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttriptracker.server.ClientHandler
triptracker.server.MapHandler
public class MapHandler
Handler for map clients.
| Field Summary |
|---|
| Fields inherited from class triptracker.server.ClientHandler |
|---|
db, in, inStream, out, outStream, route, server, user |
| Constructor Summary | |
|---|---|
MapHandler(Server server,
Socket socket,
User user)
Sets up socket streams for communication with a map client and creates the message reader thread for message processing. |
|
| Method Summary | |
|---|---|
void |
coordinateBufferUpdate(String[] coords)
Invoked when a new buffered coordinates is received from a GPS client. |
void |
coordinateUpdate(Coordinate coord)
Sends newly recieved coordinate to mapClient. |
protected void |
getRoute(int routeId)
For recieving a complete route from database. |
protected void |
getUsers()
Sends a list of users to client. |
protected boolean |
messageHandler(String message)
Invoked when a new message has been recieved. |
void |
startLogging(GPSHandler gpsHandler)
Signals that tracking will start |
protected void |
stopHandler()
TODO (harald) Not finished yet!!! The method making sure everything is being shutdown before the handler deletes itself. |
void |
stopLogging(GPSHandler gpsHandler)
Will stop the logging of a tracker. |
| Methods inherited from class triptracker.server.ClientHandler |
|---|
getActiveRoute, log, messageLoop, sendMessage, sendMessage, sendZipMessage, startHandler, viewRoutes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapHandler(Server server,
Socket socket,
User user)
throws IOException
server - main server instancesocket - client communication socketuser - client user data
IOException - on connection failure| Method Detail |
|---|
protected void stopHandler()
stopHandler in class ClientHandlerprotected boolean messageHandler(String message)
messageHandler in class ClientHandlermessage - received message from clientpublic void coordinateUpdate(Coordinate coord)
coordinateUpdate in interface CoordListenercoord - new coordinatepublic void coordinateBufferUpdate(String[] coords)
CoordListener
coordinateBufferUpdate in interface CoordListenercoords - String of buffered coordinatespublic void stopLogging(GPSHandler gpsHandler)
stopLogging in interface CoordListenerpublic void startLogging(GPSHandler gpsHandler)
protected void getUsers()
protected void getRoute(int routeId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||