Commit Graph

760 Commits

Author SHA1 Message Date
akwizgran
916fa66560 ReliabilityLayer doesn't need to expose a public WriteHandler interface. 2012-12-15 02:21:35 +00:00
akwizgran
5876583f7c Moved reliability layer into its own package. 2012-12-15 02:07:46 +00:00
akwizgran
f5628e5581 Use Guice rather than reflection to load plugins.
This allows different plugins to have different dependencies without
cluttering the plugin factory API.
2012-12-15 01:16:48 +00:00
akwizgran
8bc27528a6 Reduced visibilty of constructors. 2012-12-15 00:10:29 +00:00
akwizgran
13df22f69a Better hashCode methods. 2012-12-14 22:11:29 +00:00
akwizgran
47749c3c0d Converted ReliabilityLayer into an interface for better testability. 2012-12-14 21:57:50 +00:00
akwizgran
e5d15d42d6 Use an executor for the reliability layer's writer task. 2012-12-14 21:24:12 +00:00
akwizgran
1e1a226f30 Reliability layer must call Sender.tick() periodically. 2012-12-14 20:44:28 +00:00
akwizgran
1bc3d52957 If an exception occurs during fast retransmission, propagate it. 2012-12-14 20:19:53 +00:00
akwizgran
6e567e1e55 Removed a redundant variable.
The offHook flag was equivalent to reliabilityLayer != null.
2012-12-14 19:42:55 +00:00
akwizgran
0bfa4f15a1 Safer locking for ModemImpl. 2012-12-14 19:34:25 +00:00
akwizgran
cd3bacc8cf Code cleanup for modem plugin, better locking in ModemImpl. 2012-12-10 16:15:50 +00:00
akwizgran
15ab5be476 Equals method must be symmetric and transitive. 2012-12-09 20:29:29 +00:00
akwizgran
a97dc0de6b Don't let references to this escape from constructors. 2012-12-07 17:22:24 +00:00
akwizgran
57bc9d3313 Flush the output stream when closing. 2012-12-07 17:21:58 +00:00
akwizgran
13f9127da0 Merge branch 'master' of file:///media/Verbatim/prototype 2012-12-07 16:22:08 +00:00
akwizgran
cdeefbbc5f Wait 60 seconds for the server to hang up. 2012-12-07 16:21:31 +00:00
akwizgran
068d3b1dbd The reliability layer should run when the modem is off the hook. 2012-12-07 16:20:53 +00:00
akwizgran
ef8841e712 Non-JUnit tests for detecting when the other end hangs up. 2012-12-07 16:10:58 +00:00
akwizgran
a6777f1fe1 Ensure each reliability layer is started and stopped. 2012-12-07 15:40:03 +00:00
akwizgran
19106ae044 Log exceptions with stack traces. 2012-12-07 15:22:34 +00:00
akwizgran
90978fa9c6 Removed verbose logging that was added for debugging. 2012-12-07 15:21:32 +00:00
akwizgran
c4bf931b80 Ensure the reliability layer is stopped when the modem is stopped. 2012-12-07 15:03:54 +00:00
akwizgran
9528a8b6d6 Minor refactoring and logging for reliability layer. 2012-12-07 15:00:16 +00:00
akwizgran
28086e1a7f Abort connection attempt if NO CARRIER is received from modem. 2012-12-07 14:43:23 +00:00
akwizgran
64a8fb1888 Wait for all data to be acked when flushing output stream. Logging. 2012-12-06 18:20:55 +00:00
akwizgran
7759c10d23 Don't let references to this escape the constructor. 2012-12-06 16:57:31 +00:00
akwizgran
5516503f67 Removed broken code for flushing the output stream. 2012-12-06 16:56:08 +00:00
akwizgran
0b7ecde4c8 Wait for writes to complete before closing the serial port. 2012-12-06 16:36:51 +00:00
akwizgran
bfbcdfa5a7 Don't send and receive invitations unless the plugin supports it. 2012-12-06 16:13:54 +00:00
akwizgran
1786b39d6e Don't overwrite the first frame's header with data. 2012-12-06 16:09:15 +00:00
akwizgran
d3062a992d Increased connection timeout to 2 minutes, more logging. 2012-12-06 16:05:57 +00:00
akwizgran
058323c6c2 Log at Level.INFO instead of Level.FINE. 2012-12-06 16:01:31 +00:00
akwizgran
940f362a97 More logging to debug the reliability layer. 2012-12-06 15:55:14 +00:00
akwizgran
706d3ea3cf Initialise the reliability layer. 2012-12-06 15:55:00 +00:00
akwizgran
e9ebec44cd More logging to debug the reliability layer. 2012-12-06 15:45:14 +00:00
akwizgran
78953289f7 Flush the output stream after writing. 2012-12-06 15:44:58 +00:00
akwizgran
4c9c49fa55 Logging to debug reliability layer. 2012-12-06 15:36:51 +00:00
akwizgran
f9ec483791 If the modem is off the hook when it's stopped, hang up. 2012-12-06 15:33:51 +00:00
akwizgran
584f7de0ab Wait a long time for a connection (modems take a while to connect). 2012-12-06 15:27:26 +00:00
akwizgran
cdc89f5cba Recompiled jSSC for Java 1.5 (again). 2012-12-06 15:20:16 +00:00
akwizgran
a4712140e6 Made serial port's state volatile, added method for stopping modem. 2012-12-06 15:09:04 +00:00
akwizgran
25fa4decfb Include /dev/ttyusbmodem* in serial port list on OS X. 2012-12-06 14:34:10 +00:00
akwizgran
f0c61a9b25 Find Linux serial ports by exploring /dev rather than executing dmesg. 2012-12-06 14:17:03 +00:00
akwizgran
80f5e0a7ff Don't try to close the serial port if it wasn't opened. 2012-12-06 14:07:19 +00:00
akwizgran
4ece151df8 Include stack traces in logs. 2012-12-06 14:00:31 +00:00
akwizgran
56e7f459e8 Allow the modem to respond OK more than once. 2012-12-06 13:56:14 +00:00
akwizgran
c13c01a114 Recompiled jSSC for Java 1.5. 2012-12-06 13:46:16 +00:00
akwizgran
12765ee173 Patched jSSC to recognise /dev/tty.modem as a serial port on OS X. 2012-12-06 13:43:30 +00:00
akwizgran
aec43d6de7 Enabled logging in non-JUnit modem tests. 2012-12-06 13:36:10 +00:00