Skip to content

djutils v2.1.1

Compare
Choose a tag to compare
@averbraeck averbraeck released this 02 Jan 16:52
· 470 commits to main since this release

Changes in djutils project, event package:

  • EventProducer implements RemoteException for all methods. This enables the usage of the EventProducer and EventListener as remote objects, where a remote EventListener can call addListener() on a remote EventProducer, and the EventProducer can call notify() on a remote EventListener.
  • The LocalEventProducer wraps all methods with RemoteException. Since it is a local (non-remote) class, no RemoteExceptions will be thrown. Therefore, the class wraps all methods and throws the RemoteException embedded in a RuntimeException.
  • The Event-producing collections now extend LocalEventProducer. This to avoid having to wrap all methods to avoid throwing RemoteExceptions for all methods. Of course, a more generic version that also acts as a remote event producing collection could be built as well.
  • The RmiObject can throw a RemoteException on the getRegistry() method.
  • The RmiEventProducer throws RemoteException on all methods.

These changes should make remote publish/subscribe through the event package more robust.