Class LoggingEventListener
- java.lang.Object
-
- org.djutils.stats.summarizers.event.LoggingEventListener
-
- All Implemented Interfaces:
Serializable
,EventListener
,EventListenerInterface
public class LoggingEventListener extends Object implements EventListenerInterface
LoggingEventListener logs the last event that was received and the number of received events so they can be checked.
Copyright (c) 2020-2021 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LoggingEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventInterface
getLastEvent()
int
getNumberOfEvents()
void
initialize()
set the last event to null.void
notify(EventInterface event)
-
-
-
Method Detail
-
initialize
public void initialize()
set the last event to null.
-
notify
public void notify(EventInterface event) throws RemoteException
- Specified by:
notify
in interfaceEventListenerInterface
- Throws:
RemoteException
-
getLastEvent
public EventInterface getLastEvent()
- Returns:
- EventInterface; the last received event
-
getNumberOfEvents
public int getNumberOfEvents()
- Returns:
- received numberOfEvents
-
-