Package org.djutils.event

Provides classes and interfaces for asynchronous communication. The event package is designed around three interfaces:
  • The EventListenerInterface defining callback mechanism for a listener.
  • The EventProducerInterface defining registration capabilities.
  • The EventInterface defining the events which are sent by a producer and received by a listener.
In this package, two aspects are of crucial importance. Operations defined in the interfaces are prepared for distribution. The event.remote package extends all listeners and producers to throw the RemoteException on network problems. The second aspect is concurrency. The classes providing a reference implementation of these interfaces are designed for multi-threaded deployment.

Copyright (c) 2002-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html. This class was originally part of the DSOL project, see https://simulation.tudelft.nl/dsol/manual.

Author:
Peter Jacobs , Alexander Verbraeck
  • Interface Summary 
    Interface Description
    EventInterface
    The EventInterface defines the a strongly typed event (using the EventType).
    EventListenerInterface
    The EventListenerInterface creates a callback method for publishers to inform their clients.
    EventProducerInterface
    The EventProducerInterface defines the registration operations of an event producer.
    EventTypeInterface
    The EventTypeInteface is the description of a topic used for the subscription to asynchronous events.
    IdProvider
    This functional interface provides a sourceId to an EventProducer.
  • Class Summary 
    Class Description
    AbstractEvent
    The Event class forms the reference implementation for the EventInterface.
    AbstractEventType
    Reference implementation of the EventType.
    Event
    The Event class forms the reference implementation for the EventInterface.
    EventListenerMap
    The EventListenerMap maps EventTypes on lists of References to EventListeners.
    EventProducer
    The EventProducer forms the reference implementation of the EventProducerInterface.
    EventProducerImpl
    The EventProducer forms the reference implementation of the EventProducerInterface.
    EventType
    The EventType is the description of a topic used for the subscription to asynchronous events.
    TimedEvent<T extends Comparable<T> & Serializable>
    The TimedEvent is the reference implementation for a timed event.
    TimedEventType
    The TimedEventType is the description of a topic used for the subscription to asynchronous events with a time stamp.