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