Commit Graph

  • f8ca06f79d Changed callback arguments to varargs and renamed a method. akwizgran 2011-10-06 11:13:19 +01:00
  • 11b571fd8f Moved locking to the superclass to simplify subclasses. akwizgran 2011-10-06 09:34:15 +01:00
  • ffe10e1502 Don't call the callback after stop() has been called. akwizgran 2011-10-06 09:25:50 +01:00
  • 6737e4ddfb Merged common methods of BatchTransportPlugin and StreamTransportPlugin into a superclass. akwizgran 2011-10-06 09:22:56 +01:00
  • b54668c50b Renamed InvalidTransportException -> InvalidPropertiesException. akwizgran 2011-10-06 09:18:13 +01:00
  • 45fd4c9060 Simple TCP socket plugin (untested). akwizgran 2011-10-06 09:17:22 +01:00
  • 80cba1e7f7 Added finish() methods to transport readers/writers, and added a readerFinished() callback method to FilePlugin. akwizgran 2011-10-05 18:59:30 +01:00
  • 775d76d040 Removed unused classes. akwizgran 2011-10-05 18:54:49 +01:00
  • 6160a5f56c Formatting. akwizgran 2011-10-05 18:49:27 +01:00
  • 3ffb56bf12 Factored ConnectionRecogniser out of transport plugins. akwizgran 2011-10-05 18:48:10 +01:00
  • af41e42c6c Use an Executor to decouple the callback from the caller. akwizgran 2011-10-05 17:22:21 +01:00
  • 8940dc83cb Replaced assertTrue(Arrays.equals()) with assertArrayEquals(). akwizgran 2011-10-05 17:07:52 +01:00
  • c054e1c00e Replaced some sleeps with latches. akwizgran 2011-10-05 16:51:26 +01:00
  • 9464e29d75 Unit tests for the reader portion of RemovableDrivePlugin. akwizgran 2011-10-05 16:39:20 +01:00
  • f6df333796 Changed drive monitors to use callbacks rather than blocking. akwizgran 2011-10-05 16:11:18 +01:00
  • 3a321b0f0e Unit tests for PollingRemovableDriveMonitor. akwizgran 2011-10-05 14:51:24 +01:00
  • 2ce8d2a418 Fixed a race condition: start the monitor before creating files. akwizgran 2011-10-05 14:09:43 +01:00
  • a773bbc320 Unit tests for UnixRemovableDriveMonitor. akwizgran 2011-10-05 13:47:38 +02:00
  • 2095c2bbaa Removable drive monitors for Windows, Mac and Linux (untested). akwizgran 2011-10-05 13:27:37 +02:00
  • b65713796e Added JNotify jar and native libraries for Linux and Mac. akwizgran 2011-10-05 13:27:04 +02:00
  • d49ab73d81 Unit tests and bug fixes for removable drive finders. akwizgran 2011-10-04 22:36:00 +01:00
  • 18723a56ae Unit tests for the removable drive plugin. akwizgran 2011-10-04 22:04:10 +01:00
  • f4af582592 Don't try to get the free space for a nonexistent file. akwizgran 2011-10-04 21:47:38 +01:00
  • ef811ed295 Removed println. akwizgran 2011-10-04 21:45:15 +01:00
  • f02e6b3f89 Removable drive finders for Windows, Mac and Linux (untested). akwizgran 2011-10-04 21:04:22 +01:00
  • 9c48ad032f Added JNA jars. akwizgran 2011-10-04 21:03:25 +01:00
  • 11a6858c46 Updated transport plugin API. akwizgran 2011-10-04 17:49:18 +01:00
  • 2d62b0ad67 Moved private method inline. akwizgran 2011-10-04 17:35:05 +01:00
  • 74ca71d9c1 Check for symlinks when deleting directories. Allow Database.open() and close() to throw IOExceptions as well as DatabaseExceptions. akwizgran 2011-10-03 18:35:18 +01:00
  • 72b594d270 Type-safe transport IDs. akwizgran 2011-09-30 12:52:29 +01:00
  • 7190509ede Use numeric IDs rather than names to identify transports. akwizgran 2011-09-29 15:40:09 +01:00
  • c77b4e5b91 Get the outgoing connection number from the database. akwizgran 2011-09-28 19:26:57 +01:00
  • 2edb18aee0 Store outgoing connection numbers in the database. akwizgran 2011-09-28 19:24:22 +01:00
  • 5aa7da2048 ProtocolIntegrationTest (formerly FileReadWriteTest) doesn't need to use a file. akwizgran 2011-09-28 18:58:45 +01:00
  • a8b96f11fd Added Consumer support to Writer, to avoid redundant copying. akwizgran 2011-09-28 18:47:24 +01:00
  • 9c2e3917bf Added an integration test for batch transports. akwizgran 2011-09-28 14:43:23 +01:00
  • a1b664b639 More refactoring to connect ConnectionRecogniser to ConnectionReader. akwizgran 2011-09-28 14:21:38 +01:00
  • 4aff0c4f88 Refactored transport component and renamed WritersModule. akwizgran 2011-09-27 19:21:44 +01:00
  • 6ed8d89e59 Don't block when free disk space is critically low. akwizgran 2011-09-27 17:05:51 +01:00
  • 90e32ac906 AtomicBoolean is not needed. akwizgran 2011-09-27 16:29:41 +01:00
  • dea77b22d7 Don't call stopped.get() outside the lock. akwizgran 2011-09-27 16:26:55 +01:00
  • a40c081815 Record when the latest subscription/transport update was sent. akwizgran 2011-09-26 18:13:48 +01:00
  • 266048a815 Removed an unused method. akwizgran 2011-09-26 18:03:02 +01:00
  • 53b5a61ab3 Replaced Database.getParent() with getGroupMessageParent(). akwizgran 2011-09-26 18:00:56 +01:00
  • 124188a0a1 DatabaseComponent.setSeen() should call setStatusSeenIfVisible(). akwizgran 2011-09-25 14:39:31 +01:00
  • 98ab523092 Database refactoring to fix injection problems. akwizgran 2011-09-23 18:52:56 +01:00
  • 4b0e91f52c Removed test classes' dependency on ByteArray{Input,Output)Stream. akwizgran 2011-09-23 16:36:07 +01:00
  • 2a92ed0056 Removed fake database password from Guice module. akwizgran 2011-09-23 16:25:48 +01:00
  • b470afb4ef Added DatabaseComponent.setSeen() for handling requests. akwizgran 2011-09-23 16:06:14 +01:00
  • ba1c61810d Updated the visibility criteria of setStatusSeenIfVisible(). akwizgran 2011-09-23 16:04:58 +01:00
  • 7c6e0c349c Extracted constants from DatabaseComponent interface. akwizgran 2011-09-23 15:33:41 +01:00
  • b675c38953 Don't do IO while holding database locks. akwizgran 2011-09-23 12:55:23 +01:00
  • 09971c8460 Implemented incoming and outgoing batch connections (untested). akwizgran 2011-09-22 16:26:06 +01:00
  • b65d6631f1 Removed writer's count of bytes written and renamed a method. akwizgran 2011-09-21 18:22:14 +01:00
  • 52f3b70c3f Added size-unlimited version of Database.getSendableMessages(). akwizgran 2011-09-21 18:10:22 +01:00
  • eba6884281 Javadocs. akwizgran 2011-09-21 18:09:56 +01:00
  • e589d44d9f Where possible, do IO outside transactions and locks. akwizgran 2011-09-21 18:04:21 +01:00
  • 43a6a22f4a Don't call finish() unless at least one message ID was written. akwizgran 2011-09-21 17:52:34 +01:00
  • 8dd7ec93e7 DatabaseComponent.generateAck() now returns a boolean. akwizgran 2011-09-21 17:51:17 +01:00
  • fadd95ae49 Added a test for MAX_PACKET_LENGTH. akwizgran 2011-09-21 15:56:50 +01:00
  • 10c3b21726 Expose the encryption and authentication overhead without breaking encapsulation. akwizgran 2011-09-21 15:22:25 +01:00
  • 7e58b25618 Allow the max packet length to be reduced from the default. akwizgran 2011-09-21 13:47:06 +01:00
  • 77d61e0aea Don't create empty packets. akwizgran 2011-09-21 13:30:04 +01:00
  • 3e60233ae0 Expose serialisation overhead without breaking encapsulation. akwizgran 2011-09-21 13:16:58 +01:00
  • 95c3fb4fed Removed getCapacity() from BatchWriter interface. akwizgran 2011-09-21 12:37:19 +01:00
  • 7ac615520b Moved tag definitions inside serial component. akwizgran 2011-09-21 12:08:27 +01:00
  • 5548eb32cd DatabaseComponent.generateBatch() now returns a boolean. akwizgran 2011-09-20 14:45:07 +01:00
  • 75446b7f7e Collapsed ack handling into a single transaction. akwizgran 2011-09-19 18:51:27 +01:00
  • 3dd3742a96 Folded findLostBatches() into receiveAck(). akwizgran 2011-09-19 18:45:19 +01:00
  • 7aeb6029a6 Assertions and comments. akwizgran 2011-09-19 16:42:27 +01:00
  • 4b97be897e Don't attempt to retrieve ratings for anonymous messages. akwizgran 2011-09-19 16:25:49 +01:00
  • 44c8f9ceaa Folded ReadWriteLockDatabaseComponent into its parent. akwizgran 2011-09-19 15:29:40 +01:00
  • 7ef44fbab1 Updated javadoc and renamed type parameters. akwizgran 2011-09-19 15:01:55 +01:00
  • bf01dd4f96 Folded ReadWriteLockDatabaseComponentTest into its parent. akwizgran 2011-09-19 14:58:32 +01:00
  • 22b8321376 Removed SynchronizedDatabaseComponent. akwizgran 2011-09-19 14:54:29 +01:00
  • f6e5ef415a BadPaddingExceptions should be rethrown as RuntimeExceptions. akwizgran 2011-09-19 14:53:44 +01:00
  • 11cf84dedc Arrays.copyOfRange() is not available in Java 5. akwizgran 2011-09-19 14:53:12 +01:00
  • 7cdca62063 IOException(Throwable) constructor isn't available in Java 5. akwizgran 2011-09-19 14:49:27 +01:00
  • fde354957c Timestamps may not be negative. akwizgran 2011-09-16 13:20:49 +01:00
  • 53f02f7a52 Fixed unit tests for database component. akwizgran 2011-09-16 13:13:27 +01:00
  • ad1ef4461f SynchronizedDatabaseComponent.addLocalPrivateMessage() was not checking whether the contact was still in the DB. akwizgran 2011-09-16 13:11:20 +01:00
  • f18c86b0d3 Unit tests for private messages. akwizgran 2011-09-16 13:06:04 +01:00
  • 43a59d9dbe Database.hasSendableMessages() should check for private messages. akwizgran 2011-09-16 12:55:57 +01:00
  • 5f05a7f898 Unit tests for private messages. akwizgran 2011-09-16 11:33:55 +01:00
  • 005e7d5207 Added a random salt to prevent ID clashes between anonymous messages. akwizgran 2011-09-13 17:56:44 +01:00
  • 8ec40587b2 Check for sendable private messages as well as group messages. akwizgran 2011-09-13 16:15:50 +01:00
  • b78cfa6c88 More DB support for private messages - needs unit tests. akwizgran 2011-09-13 15:40:33 +01:00
  • 2670d7b821 DB support for private messages. akwizgran 2011-09-13 15:12:36 +01:00
  • de5caca578 Basic database support for private messages. akwizgran 2011-09-13 14:43:48 +01:00
  • 2858c139fa Make the group field of messages optional. akwizgran 2011-09-13 14:17:22 +01:00
  • 1d25b5a92e Use null instead of MessageId.NONE and AuthorId.NONE, as for other optional fields. akwizgran 2011-09-13 14:04:23 +01:00
  • 70b1487140 Renamed user-defined tags "user-defined type identifiers". akwizgran 2011-09-12 16:32:25 +01:00
  • fd2046d984 Renumbered object identifiers to reflect removal of OFFER_ID. akwizgran 2011-09-12 16:23:55 +01:00
  • 64548375cc Offer IDs no longer need to be calculated or echoed in requests. akwizgran 2011-09-12 16:21:17 +01:00
  • 7ed747b2a3 Added an initiator flag (bit 31) to the IV. akwizgran 2011-09-07 17:21:52 +01:00
  • 39be97a4d6 Order sendable messages by timestamp. Also fixed some comments. akwizgran 2011-09-07 15:55:03 +01:00
  • bbf957cc94 We can squeeze in a few more subscriptions. akwizgran 2011-09-07 14:06:35 +01:00
  • cc36d9d6c3 Don't forget 8 bytes for the timestamp. akwizgran 2011-09-07 13:54:19 +01:00
  • 331e7e0547 Increased the maximum packet size to 1 MiB. akwizgran 2011-09-07 13:51:30 +01:00
  • 1ac1609dc2 Renamed a couple of classes. akwizgran 2011-09-07 11:30:42 +01:00