View Javadoc
1   package org.djutils.event;
2   
3   import java.io.Serializable;
4   import java.util.List;
5   import java.util.Set;
6   
7   import org.djutils.event.ref.Reference;
8   import org.djutils.event.ref.ReferenceType;
9   
10  /**
11   * The EventProducer forms the reference implementation of the EventProducerInterface. Objects extending this class are provided
12   * all the functionalities for registration and event firing. The storage of the listeners is done in a Map with the EventType
13   * as the key, and a List of References (weak or strong) to the Listeners. The class uses a helper class EventProducerImpl to do
14   * the real work, and avoid code duplication.
15   * <p>
16   * Copyright (c) 2002-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
17   * for project information <a href="https://djutils.org" target="_blank"> https://djutils.org</a>. The DJUTILS project is
18   * distributed under a three-clause BSD-style license, which can be found at
19   * <a href="https://djutils.org/docs/license.html" target="_blank"> https://djutils.org/docs/license.html</a>. This class was
20   * originally part of the DSOL project, see <a href="https://simulation.tudelft.nl/dsol/manual" target="_blank">
21   * https://simulation.tudelft.nl/dsol/manual</a>.
22   * </p>
23   * @author <a href="https://www.linkedin.com/in/peterhmjacobs">Peter Jacobs </a>
24   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
25   */
26  public abstract class EventProducer implements EventProducerInterface, Serializable
27  {
28      /** The default serial version UID for serializable classes. */
29      private static final long serialVersionUID = 20140830L;
30  
31      /** The EventProducer helper class with the actual implementation to avoid code duplication. */
32      @SuppressWarnings("checkstyle:visibilitymodifier")
33      protected final EventProducerImpl eventProducerImpl;
34  
35      /**
36       * Constructs a new EventProducer and checks for duplicate values in event types.
37       */
38      public EventProducer()
39      {
40          this.eventProducerImpl = new EventProducerImpl(this);
41      }
42  
43      /** {@inheritDoc} */
44      @Override
45      public abstract Serializable getSourceId(); // without RemoteException
46  
47      /** {@inheritDoc} */
48      @Override
49      public final synchronized boolean addListener(final EventListenerInterface listener, final EventTypeInterface eventType)
50      {
51          return this.eventProducerImpl.addListener(listener, eventType);
52      }
53  
54      /** {@inheritDoc} */
55      @Override
56      public final synchronized boolean addListener(final EventListenerInterface listener, final EventTypeInterface eventType,
57              final ReferenceType referenceType)
58      {
59          return this.eventProducerImpl.addListener(listener, eventType, referenceType);
60      }
61  
62      /** {@inheritDoc} */
63      @Override
64      public final synchronized boolean addListener(final EventListenerInterface listener, final EventTypeInterface eventType,
65              final int position)
66      {
67          return this.eventProducerImpl.addListener(listener, eventType, position);
68      }
69  
70      /** {@inheritDoc} */
71      @Override
72      public final synchronized boolean addListener(final EventListenerInterface listener, final EventTypeInterface eventType,
73              final int position, final ReferenceType referenceType)
74      {
75          return this.eventProducerImpl.addListener(listener, eventType, position, referenceType);
76      }
77  
78      /**
79       * Remove all the listeners from this event producer.
80       * @return int; the number of removed event types
81       */
82      protected synchronized int removeAllListeners()
83      {
84          return this.eventProducerImpl.removeAllListeners();
85      }
86  
87      /**
88       * Removes all the listeners of a class from this event producer.
89       * @param ofClass Class&lt;?&gt;; the class or superclass
90       * @return int; the number of removed listeners
91       */
92      protected synchronized int removeAllListeners(final Class<?> ofClass)
93      {
94          return this.eventProducerImpl.removeAllListeners(ofClass);
95  
96      }
97  
98      /** {@inheritDoc} */
99      @Override
100     public final synchronized boolean removeListener(final EventListenerInterface listener, final EventTypeInterface eventType)
101     {
102         return this.eventProducerImpl.removeListener(listener, eventType);
103     }
104 
105     /** {@inheritDoc} */
106     @Override
107     public boolean hasListeners()
108     {
109         return this.eventProducerImpl.hasListeners();
110     }
111 
112     /** {@inheritDoc} */
113     @Override
114     public synchronized int numberOfListeners(final EventTypeInterface eventType)
115     {
116         return this.eventProducerImpl.numberOfListeners(eventType);
117     }
118 
119     /** {@inheritDoc} */
120     @Override
121     public synchronized Set<EventTypeInterface> getEventTypesWithListeners()
122     {
123         return this.eventProducerImpl.getEventTypesWithListeners();
124     }
125 
126     /**
127      * Return a safe copy of the list of (strong or weak) references to the registered listeners for the provided event type, or
128      * an empty list when nothing is registered for this event type. The method never returns a null pointer, so it is safe to
129      * use the result directly in an iterator. The references to the listeners are the original references, so not safe copies.
130      * @param eventType EventTypeInterface; the event type to look up the listeners for
131      * @return List&lt;Reference&lt;EventListenerInterface&gt;&gt;; the list of references to the listeners for this event type,
132      *         or an empty list when the event type is not registered
133      */
134     protected List<Reference<EventListenerInterface>> getListenerReferences(final EventTypeInterface eventType)
135     {
136         return this.eventProducerImpl.getListenerReferences(eventType);
137     }
138 
139     /* ********************************************************************************************************* */
140     /* ******************** FIREEVENT AND FIRETIMEDEVENT WITH METADATA VERIFICATION ************************** */
141     /* ********************************************************************************************************* */
142 
143     /**
144      * Transmit an event to all interested listeners.
145      * @param event EventInterface; the event
146      */
147     protected void fireEvent(final EventInterface event)
148     {
149         this.eventProducerImpl.fireEvent(event, true);
150     }
151 
152     /**
153      * Transmit a timed event to all interested listeners.
154      * @param event TimedEventInterface&lt;C&gt;; the timed event
155      * @param <C> the comparable type to indicate the time when the event is fired
156      */
157     protected <C extends Comparable<C> & Serializable> void fireTimedEvent(final TimedEventInterface<C> event)
158     {
159         this.eventProducerImpl.fireTimedEvent(event, true);
160     }
161 
162     /**
163      * Transmit an event with a serializable object as payload to all interested listeners.
164      * @param eventType EventTypeInterface; the eventType of the event
165      * @param value Serializable; the object sent with the event
166      * @return Serializable; the payload
167      */
168     protected Serializable fireEvent(final EventTypeInterface eventType, final Serializable value)
169     {
170         return this.eventProducerImpl.fireEvent(eventType, value, true);
171     }
172 
173     /**
174      * Transmit an event with no payload object to all interested listeners.
175      * @param eventType EventTypeInterface; the eventType of the event
176      */
177     protected void fireEvent(final EventTypeInterface eventType)
178     {
179         this.eventProducerImpl.fireEvent(eventType, true);
180     }
181 
182     /**
183      * Transmit a time-stamped event with a Serializable object (payload) to all interested listeners.
184      * @param eventType TimedEventTypeInterface; the eventType of the event.
185      * @param value Serializable; the payload sent with the event
186      * @param time C; a time stamp for the event
187      * @return Serializable; the payload
188      * @param <C> the comparable type to indicate the time when the event is fired
189      */
190     protected <C extends Comparable<C> & Serializable> Serializable fireTimedEvent(final TimedEventTypeInterface eventType,
191             final Serializable value, final C time)
192     {
193         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
194     }
195 
196     /**
197      * Transmit an event with a one byte payload to all interested listeners.
198      * @param eventType EventTypeInterface; the eventType of the event
199      * @param value byte; the payload
200      * @return byte; the payload
201      */
202     protected byte fireEvent(final EventTypeInterface eventType, final byte value)
203     {
204         return this.eventProducerImpl.fireEvent(eventType, value, true);
205     }
206 
207     /**
208      * Transmit a time-stamped event with a one byte payload to all interested listeners.
209      * @param eventType TimedEventTypeInterface; the eventType of the event
210      * @param value byte; the payload
211      * @param time C; a time stamp for the event
212      * @param <C> the comparable type to indicate the time when the event is fired
213      * @return byte; the payload
214      */
215     protected <C extends Comparable<C> & Serializable> byte fireTimedEvent(final TimedEventTypeInterface eventType,
216             final byte value, final C time)
217     {
218         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
219     }
220 
221     /**
222      * Transmit an event with a one char payload to all interested listeners.
223      * @param eventType EventTypeInterface; the eventType of the event
224      * @param value char; the payload
225      * @return char; the payload
226      */
227     protected char fireEvent(final EventTypeInterface eventType, final char value)
228     {
229         return this.eventProducerImpl.fireEvent(eventType, value, true);
230     }
231 
232     /**
233      * Transmit a time-stamped event with a one char payload to all interested listeners.
234      * @param eventType TimedEventTypeInterface; the eventType of the event
235      * @param value char; the payload
236      * @param time C; a time stamp for the event
237      * @param <C> the comparable type to indicate the time when the event is fired
238      * @return char; the payload
239      */
240     protected <C extends Comparable<C> & Serializable> char fireTimedEvent(final TimedEventTypeInterface eventType,
241             final char value, final C time)
242     {
243         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
244     }
245 
246     /**
247      * Transmit an event with a boolean payload to all interested listeners.
248      * @param eventType EventTypeInterface; the eventType of the event
249      * @param value boolean; the payload
250      * @return boolean; the payload
251      */
252     protected boolean fireEvent(final EventTypeInterface eventType, final boolean value)
253     {
254         return this.eventProducerImpl.fireEvent(eventType, value, true);
255     }
256 
257     /**
258      * Transmit a time-stamped event with a boolean payload to all interested listeners.
259      * @param eventType TimedEventTypeInterface; the eventType of the event
260      * @param value boolean; the payload
261      * @param time C; a time stamp for the event
262      * @param <C> the comparable type to indicate the time when the event is fired
263      * @return boolean; the payload
264      */
265     protected <C extends Comparable<C> & Serializable> boolean fireTimedEvent(final TimedEventTypeInterface eventType,
266             final boolean value, final C time)
267     {
268         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
269     }
270 
271     /**
272      * Transmit an event with a double value payload to all interested listeners.
273      * @param eventType EventTypeInterface; the eventType of the event
274      * @param value double; the payload
275      * @return double; the payload
276      */
277     protected double fireEvent(final EventTypeInterface eventType, final double value)
278     {
279         return this.eventProducerImpl.fireEvent(eventType, value, true);
280     }
281 
282     /**
283      * Transmit a time-stamped event with a double value payload to interested listeners.
284      * @param eventType TimedEventTypeInterface; the eventType of the event
285      * @param value double; the payload
286      * @param time C; a time stamp for the event
287      * @param <C> the comparable type to indicate the time when the event is fired
288      * @return double; the payload
289      */
290     protected <C extends Comparable<C> & Serializable> double fireTimedEvent(final TimedEventTypeInterface eventType,
291             final double value, final C time)
292     {
293         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
294     }
295 
296     /**
297      * Transmit an event with an integer payload to all interested listeners.
298      * @param eventType EventTypeInterface; the eventType of the event
299      * @param value int; the payload
300      * @return int; the payload
301      */
302     protected int fireEvent(final EventTypeInterface eventType, final int value)
303     {
304         return this.eventProducerImpl.fireEvent(eventType, value, true);
305     }
306 
307     /**
308      * Transmit a time-stamped event with an integer payload to all interested listeners.
309      * @param eventType TimedEventTypeInterface; the eventType of the event
310      * @param value int; the payload
311      * @param time C; a time stamp for the event
312      * @param <C> the comparable type to indicate the time when the event is fired
313      * @return int; the payload
314      */
315     protected <C extends Comparable<C> & Serializable> int fireTimedEvent(final TimedEventTypeInterface eventType,
316             final int value, final C time)
317     {
318         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
319     }
320 
321     /**
322      * Transmit an event with a long payload to all interested listeners.
323      * @param eventType EventTypeInterface; the eventType of the event
324      * @param value long; the payload
325      * @return long; the payload
326      */
327     protected long fireEvent(final EventTypeInterface eventType, final long value)
328     {
329         return this.eventProducerImpl.fireEvent(eventType, value, true);
330     }
331 
332     /**
333      * Transmit a time-stamped event with a long payload to all interested listeners.
334      * @param eventType TimedEventTypeInterface; the eventType of the event
335      * @param value long; the payload
336      * @param time C; a time stamp for the event
337      * @param <C> the comparable type to indicate the time when the event is fired
338      * @return long; the payload
339      */
340     protected <C extends Comparable<C> & Serializable> long fireTimedEvent(final TimedEventTypeInterface eventType,
341             final long value, final C time)
342     {
343         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
344     }
345 
346     /**
347      * Transmit an event with a short payload to all interested listeners.
348      * @param eventType EventTypeInterface; the eventType of the event
349      * @param value short; the payload
350      * @return short; the payload
351      */
352     protected short fireEvent(final EventTypeInterface eventType, final short value)
353     {
354         return this.eventProducerImpl.fireEvent(eventType, value, true);
355     }
356 
357     /**
358      * Transmit a time-stamped event with a short payload to all interested listeners.
359      * @param eventType TimedEventTypeInterface; the eventType of the event
360      * @param value short; the payload
361      * @param time C; a time stamp for the event
362      * @param <C> the comparable type to indicate the time when the event is fired
363      * @return short; the payload
364      */
365     protected <C extends Comparable<C> & Serializable> short fireTimedEvent(final TimedEventTypeInterface eventType,
366             final short value, final C time)
367     {
368         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
369     }
370 
371     /**
372      * Transmit an event with a float payload to all interested listeners.
373      * @param eventType EventTypeInterface; the eventType of the event
374      * @param value float; the payload
375      * @return float; the payload
376      */
377     protected float fireEvent(final EventTypeInterface eventType, final float value)
378     {
379         return this.eventProducerImpl.fireEvent(eventType, value, true);
380     }
381 
382     /**
383      * Transmit a time-stamped event with a float payload to all interested listeners.
384      * @param eventType TimedEventTypeInterface; the eventType of the event
385      * @param value float; the payload
386      * @param time C; a time stamp for the event
387      * @param <C> the comparable type to indicate the time when the event is fired
388      * @return float; the payload
389      */
390     protected <C extends Comparable<C> & Serializable> float fireTimedEvent(final TimedEventTypeInterface eventType,
391             final float value, final C time)
392     {
393         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, true);
394     }
395 
396     /* ********************************************************************************************************* */
397     /* ******************* FIREEVENT AND FIRETIMEDEVENT WITHOUT METADATA VERIFICATION ************************ */
398     /* ********************************************************************************************************* */
399 
400     /**
401      * Transmit an event to all interested listeners.
402      * @param event EventInterface; the event
403      */
404     protected void fireUnverifiedEvent(final EventInterface event)
405     {
406         this.eventProducerImpl.fireEvent(event, false);
407     }
408 
409     /**
410      * Transmit a timed event to all interested listeners.
411      * @param event TimedEventInterface&lt;C&gt;; the timed event
412      * @param <C> the comparable type to indicate the time when the event is fired
413      */
414     protected <C extends Comparable<C> & Serializable> void fireUnverifiedTimedEvent(final TimedEventInterface<C> event)
415     {
416         this.eventProducerImpl.fireTimedEvent(event, false);
417     }
418 
419     /**
420      * Transmit an event that is not verified with a serializable object as payload to all interested listeners.
421      * @param eventType EventTypeInterface; the eventType of the event
422      * @param value Serializable; the object sent with the event
423      * @return Serializable; the payload
424      */
425     protected Serializable fireUnverifiedEvent(final EventTypeInterface eventType, final Serializable value)
426     {
427         return this.eventProducerImpl.fireEvent(eventType, value, false);
428     }
429 
430     /**
431      * Transmit an event that is not verified with no payload object to all interested listeners.
432      * @param eventType EventTypeInterface; the eventType of the event
433      */
434     protected void fireUnverifiedEvent(final EventTypeInterface eventType)
435     {
436         this.eventProducerImpl.fireEvent(eventType, false);
437     }
438 
439     /**
440      * Transmit a timed event that is not verified with no payload object to all interested listeners.
441      * @param eventType TimedEventTypeInterface; the eventType of the event
442      * @param time C; a time stamp for the event
443      * @param <C> the comparable type to indicate the time when the event is fired
444      */
445     protected <C extends Comparable<C> & Serializable> void fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
446             final C time)
447     {
448         this.eventProducerImpl.fireTimedEvent(eventType, time, false);
449     }
450 
451     /**
452      * Transmit a time-stamped event that is not verified with a Serializable object (payload) to all interested listeners.
453      * @param eventType TimedEventTypeInterface; the eventType of the event.
454      * @param value Serializable; the payload sent with the event
455      * @param time C; a time stamp for the event
456      * @return Serializable; the payload
457      * @param <C> the comparable type to indicate the time when the event is fired
458      */
459     protected <C extends Comparable<C> & Serializable> Serializable fireUnverifiedTimedEvent(
460             final TimedEventTypeInterface eventType, final Serializable value, final C time)
461     {
462         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
463     }
464 
465     /**
466      * Transmit an event that is not verified with a one byte payload to all interested listeners.
467      * @param eventType EventTypeInterface; the eventType of the event
468      * @param value byte; the payload
469      * @return byte; the payload
470      */
471     protected byte fireUnverifiedEvent(final EventTypeInterface eventType, final byte value)
472     {
473         return this.eventProducerImpl.fireEvent(eventType, value, false);
474     }
475 
476     /**
477      * Transmit a time-stamped event that is not verified with a one byte payload to all interested listeners.
478      * @param eventType TimedEventTypeInterface; the eventType of the event
479      * @param value byte; the payload
480      * @param time C; a time stamp for the event
481      * @param <C> the comparable type to indicate the time when the event is fired
482      * @return byte; the payload
483      */
484     protected <C extends Comparable<C> & Serializable> byte fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
485             final byte value, final C time)
486     {
487         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
488     }
489 
490     /**
491      * Transmit an event that is not verified with a one char payload to all interested listeners.
492      * @param eventType EventTypeInterface; the eventType of the event
493      * @param value char; the payload
494      * @return char; the payload
495      */
496     protected char fireUnverifiedEvent(final EventTypeInterface eventType, final char value)
497     {
498         return this.eventProducerImpl.fireEvent(eventType, value, false);
499     }
500 
501     /**
502      * Transmit a time-stamped event that is not verified with a one char payload to all interested listeners.
503      * @param eventType TimedEventTypeInterface; the eventType of the event
504      * @param value char; the payload
505      * @param time C; a time stamp for the event
506      * @param <C> the comparable type to indicate the time when the event is fired
507      * @return char; the payload
508      */
509     protected <C extends Comparable<C> & Serializable> char fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
510             final char value, final C time)
511     {
512         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
513     }
514 
515     /**
516      * Transmit an event that is not verified with a boolean payload to all interested listeners.
517      * @param eventType EventTypeInterface; the eventType of the event
518      * @param value boolean; the payload
519      * @return boolean; the payload
520      */
521     protected boolean fireUnverifiedEvent(final EventTypeInterface eventType, final boolean value)
522     {
523         return this.eventProducerImpl.fireEvent(eventType, value, false);
524     }
525 
526     /**
527      * Transmit a time-stamped event that is not verified with a boolean payload to all interested listeners.
528      * @param eventType TimedEventTypeInterface; the eventType of the event
529      * @param value boolean; the payload
530      * @param time C; a time stamp for the event
531      * @param <C> the comparable type to indicate the time when the event is fired
532      * @return boolean; the payload
533      */
534     protected <C extends Comparable<C> & Serializable> boolean fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
535             final boolean value, final C time)
536     {
537         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
538     }
539 
540     /**
541      * Transmit an event that is not verified with a double value payload to all interested listeners.
542      * @param eventType EventTypeInterface; the eventType of the event
543      * @param value double; the payload
544      * @return double; the payload
545      */
546     protected double fireUnverifiedEvent(final EventTypeInterface eventType, final double value)
547     {
548         return this.eventProducerImpl.fireEvent(eventType, value, false);
549     }
550 
551     /**
552      * Transmit a time-stamped event that is not verified with a double value payload to interested listeners.
553      * @param eventType TimedEventTypeInterface; the eventType of the event
554      * @param value double; the payload
555      * @param time C; a time stamp for the event
556      * @param <C> the comparable type to indicate the time when the event is fired
557      * @return double; the payload
558      */
559     protected <C extends Comparable<C> & Serializable> double fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
560             final double value, final C time)
561     {
562         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
563     }
564 
565     /**
566      * Transmit an event that is not verified with an integer payload to all interested listeners.
567      * @param eventType EventTypeInterface; the eventType of the event
568      * @param value int; the payload
569      * @return int; the payload
570      */
571     protected int fireUnverifiedEvent(final EventTypeInterface eventType, final int value)
572     {
573         return this.eventProducerImpl.fireEvent(eventType, value, false);
574     }
575 
576     /**
577      * Transmit a time-stamped event that is not verified with an integer payload to all interested listeners.
578      * @param eventType TimedEventTypeInterface; the eventType of the event
579      * @param value int; the payload
580      * @param time C; a time stamp for the event
581      * @param <C> the comparable type to indicate the time when the event is fired
582      * @return int; the payload
583      */
584     protected <C extends Comparable<C> & Serializable> int fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
585             final int value, final C time)
586     {
587         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
588     }
589 
590     /**
591      * Transmit an event that is not verified with a long payload to all interested listeners.
592      * @param eventType EventTypeInterface; the eventType of the event
593      * @param value long; the payload
594      * @return long; the payload
595      */
596     protected long fireUnverifiedEvent(final EventTypeInterface eventType, final long value)
597     {
598         return this.eventProducerImpl.fireEvent(eventType, value, false);
599     }
600 
601     /**
602      * Transmit a time-stamped event that is not verified with a long payload to all interested listeners.
603      * @param eventType TimedEventTypeInterface; the eventType of the event
604      * @param value long; the payload
605      * @param time C; a time stamp for the event
606      * @param <C> the comparable type to indicate the time when the event is fired
607      * @return long; the payload
608      */
609     protected <C extends Comparable<C> & Serializable> long fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
610             final long value, final C time)
611     {
612         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
613     }
614 
615     /**
616      * Transmit an event that is not verified with a short payload to all interested listeners.
617      * @param eventType EventTypeInterface; the eventType of the event
618      * @param value short; the payload
619      * @return short; the payload
620      */
621     protected short fireUnverifiedEvent(final EventTypeInterface eventType, final short value)
622     {
623         return this.eventProducerImpl.fireEvent(eventType, value, false);
624     }
625 
626     /**
627      * Transmit a time-stamped event that is not verified with a short payload to all interested listeners.
628      * @param eventType TimedEventTypeInterface; the eventType of the event
629      * @param value short; the payload
630      * @param time C; a time stamp for the event
631      * @param <C> the comparable type to indicate the time when the event is fired
632      * @return short; the payload
633      */
634     protected <C extends Comparable<C> & Serializable> short fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
635             final short value, final C time)
636     {
637         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
638     }
639 
640     /**
641      * Transmit an event that is not verified with a float payload to all interested listeners.
642      * @param eventType EventTypeInterface; the eventType of the event
643      * @param value float; the payload
644      * @return float; the payload
645      */
646     protected float fireUnverifiedEvent(final EventTypeInterface eventType, final float value)
647     {
648         return this.eventProducerImpl.fireEvent(eventType, value, false);
649     }
650 
651     /**
652      * Transmit a time-stamped event that is not verified with a float payload to all interested listeners.
653      * @param eventType TimedEventTypeInterface; the eventType of the event
654      * @param value float; the payload
655      * @param time C; a time stamp for the event
656      * @param <C> the comparable type to indicate the time when the event is fired
657      * @return float; the payload
658      */
659     protected <C extends Comparable<C> & Serializable> float fireUnverifiedTimedEvent(final TimedEventTypeInterface eventType,
660             final float value, final C time)
661     {
662         return this.eventProducerImpl.fireTimedEvent(eventType, value, time, false);
663     }
664 
665 }