Interface EventListenerInterface

All Superinterfaces:
EventListener, Serializable
All Known Subinterfaces:
RemoteEventListenerInterface
All Known Implementing Classes:
EventProducingCollection, EventProducingList, EventProducingSet, RemoteEventListener

public interface EventListenerInterface
extends EventListener, Serializable
The EventListenerInterface 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-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
  • Method Summary

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

    • notify

      void notify​(EventInterface event) throws RemoteException
      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 - EventInterface; the event which is sent to the listener
      Throws:
      RemoteException - If a network connection failure occurs.