Update to simmobility4android libs files. RoadRunner also auto-starts.
EVIL COMMIT: This actually works with MegaDroid, but has some nasty side-effects. I'll clean up and comment later, but since I don't have access to the cluster right now, I'm adding this commit verbatim in case it contains some crazy logic that we may not be able to reproduce later.
Changes to the simmobility4android library files.
Changed the main RoadRunner/SimMobilityBroker files. This commit *should* work fine; fall back to the EVIL COMMIT only if necessary.
Removed parameterization for T extends Message in Handler/Factory. It only provided a marginal benefit, and complicated things a great deal (plus, the original code didn't even use it properly half the time).
Added licensing information and author tags. Where unknown, I listed both Pedro and Vahid.
Moved logging into an interface; RoadRunnerActivity simply implements this.
Started cleaning up MinaConnector; moved the Handler into its own class. Cleaned up some warnings.
Moved region generation code out of RoadRunnerService; it's static in nature and clutters up the main code.
First effort at simplifying the MinaConnector: removed "listen" from the Connector class.
More cleanup; session connecting, sending, and error reporting.
We only ever sent/received Strings, so I am using .toString() in the Apache MINA code and changing all Objects to Strings after that. Otherwise, we have an implicit assumption of String, which is worse than an explicit constraint.
Moved simmobility4android into a more likely namespace (edu.mit.smart, which actually exists, and shortened the internal name to sm4and)
Slightly rearranged source code; Handler, Connector, and HandlerFactory are top-level, since you'll need to override those if you want to change how one connects to the server or how Messages are created. Mina code moved to the .mina package. Messages are reduced to child (static) classes in their respective Handlers since (1) they're tiny anyway and (2) members are private, so there's no risk of an outsider accidentally modifying them. Gson can still set private fields just fine.
Separated the parsing of messages from their handling. This will (eventually) allow us to use different formats (i.e., not json).
Some fixes for gson and enums; the client/server relationship now works again.
Separated message return into the MessageParser; now all message handlers are json-agnostic.
More namespace changes, more comments, and removed the "session end" future that was causing our main thread to wait.
Removed MessageListener; it was way too obtuse (replaced it with a single line in MinaConnector).
More cleanup; duplication of messages, handlers, etc. was reduced. We still have the issue that multiple messages may arrive separately.