Class LoggingEventListener

java.lang.Object
org.djutils.stats.summarizers.event.LoggingEventListener
All Implemented Interfaces:
Serializable, Remote, EventListener, org.djutils.event.EventListener

public class LoggingEventListener extends Object implements org.djutils.event.EventListener
LoggingEventListener logs the last event that was received and the number of received events so they can be checked.

Copyright (c) 2020-2024 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.
Author:
Alexander Verbraeck, Peter Knoppers
See Also:
  • Constructor Details

    • LoggingEventListener

      public LoggingEventListener()
  • Method Details

    • initialize

      public void initialize()
      set the last event to null.
    • notify

      public void notify(org.djutils.event.Event event) throws RemoteException
      Specified by:
      notify in interface org.djutils.event.EventListener
      Throws:
      RemoteException
    • getLastEvent

      public org.djutils.event.Event getLastEvent()
      Returns:
      Event; the last received event
    • getNumberOfEvents

      public int getNumberOfEvents()
      Returns:
      received numberOfEvents