Interface EventListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
EventProducingCollection, EventProducingList, EventProducingSet, RmiEventListener

public interface EventListener extends EventListener
The EventListener interface creates a callback method for publishers to inform their clients. The EventListener and EventProducer together form a combination of the Publish-Subscribe design pattern and the Observer design pattern using the notify(event) method. See https://en.wikipedia.org/wiki/Publish-subscribe_pattern, https://en.wikipedia.org/wiki/Observer_pattern, and https://howtodoinjava.com/design-patterns/behavioral/observer-design-pattern/.

Copyright (c) 2002-2025 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
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    notify(Event event)
    Notifies the event listener of an event.
  • Method Details

    • notify

      void notify(Event event)
      Notifies the event listener of an event. This operation forms the callback method of the asynchronous communication protocol expressed in the event package.
      Parameters:
      event - the event which is sent to the listener