Package org.djutils.event
Class TimedEventType
- java.lang.Object
-
- org.djutils.event.AbstractEventType
-
- org.djutils.event.TimedEventType
-
- All Implemented Interfaces:
Serializable
,EventTypeInterface
,TimedEventTypeInterface
public class TimedEventType extends AbstractEventType implements TimedEventTypeInterface
The TimedEventType is the description of a topic used for the subscription to asynchronous events with a time stamp. Event types are used by EventProducers to show which events they potentially fire. EventTypes are typically defined as static final fields. This class only accepts when the producer fires events of type TimedEvent, and not a generic Event or subclass of TimedEvent.
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 TimedEventType(String name)
Deprecated.TimedEventType(String name, MetaData metaData)
Construct a new TimedEventType.TimedEventType(MetaData metaData)
Construct a new TimedEventType.
-
Method Summary
-
Methods inherited from class org.djutils.event.AbstractEventType
equals, getMetaData, getName, getValidEventType, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.djutils.event.EventTypeInterface
getMetaData, getName, getValidEventType
-
-
-
-
Constructor Detail
-
TimedEventType
public TimedEventType(String name, MetaData metaData)
Construct a new TimedEventType. Only events of the type TimedEvent, but not classes of Event or subclasses of TimedEvent, can be used to fire events of this type. This means that firing an ordinary Event using this EventType will result in an error.- Parameters:
name
- String; the name of the new eventType. Two values are not appreciated: null and the empty string.metaData
- MetaData; describes the payload of events of the new EventType;
-
TimedEventType
public TimedEventType(MetaData metaData)
Construct a new TimedEventType. The name of the metadata will function as the name of the event. Only events of the type TimedEvent, but not classes of Event or subclasses of TimedEvent, can be used to fire events of this type. This means that firing an ordinary Event using this EventType will result in an error.- Parameters:
metaData
- MetaData; describes the payload of events of the new EventType;
-
TimedEventType
@Deprecated public TimedEventType(String name)
Deprecated.Construct a new TimedEventType with no meta data. Only events of the type TimedEvent, but not classes of Event or subclasses of TimedEvent, can be used to fire events of this type. This means that firing an ordinary Event using this EventType will result in an error.- Parameters:
name
- String; the name of the new eventType. Two values are not appreciated: null and the empty string.
-
-