Package org.djutils.event.remote
Class RemoteEventProducer
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- org.djutils.rmi.RMIObject
-
- org.djutils.event.remote.RemoteEventProducer
-
- All Implemented Interfaces:
Serializable
,Remote
,EventProducerInterface
,RemoteEventProducerInterface
public abstract class RemoteEventProducer extends RMIObject implements RemoteEventProducerInterface
The RemoteEventProducer provides a remote implementation of the eventProducer.Copyright (c) 2002-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. This class was originally part of the DSOL project, see https://simulation.tudelft.nl/dsol/manual.
- Author:
- Peter Jacobs , Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected EventProducerImpl
eventProducerImpl
The EventProducer helper class with the actual implementation to avoid code duplication.-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
-
Constructor Summary
Constructors Constructor Description RemoteEventProducer(String host, int port, String bindingKey)
Create a remote event listener and register the listener in the RMI registry.RemoteEventProducer(URL registryURL, String bindingKey)
Create a remote event listener and register the listener in the RMI registry.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
addListener(EventListenerInterface listener, EventTypeInterface eventType)
Add a listener as strong reference to the BEGINNING of a queue of listeners.boolean
addListener(EventListenerInterface listener, EventTypeInterface eventType, int position)
Add a listener as strong reference to the specified position of a queue of listeners.boolean
addListener(EventListenerInterface listener, EventTypeInterface eventType, int position, ReferenceType referenceType)
Add a listener to the specified position of a queue of listeners.boolean
addListener(EventListenerInterface listener, EventTypeInterface eventType, ReferenceType referenceType)
Add a listener to the BEGINNING of a queue of listeners.protected void
fireEvent(EventInterface event)
Transmit an event to all interested listeners.protected void
fireEvent(EventTypeInterface eventType)
Transmit an event with no payload object to all interested listeners.protected boolean
fireEvent(EventTypeInterface eventType, boolean value)
Transmit an event with a boolean payload to all interested listeners.protected byte
fireEvent(EventTypeInterface eventType, byte value)
Transmit an event with a one byte payload to all interested listeners.protected char
fireEvent(EventTypeInterface eventType, char value)
Transmit an event with a one char payload to all interested listeners.protected double
fireEvent(EventTypeInterface eventType, double value)
Transmit an event with a double value payload to all interested listeners.protected float
fireEvent(EventTypeInterface eventType, float value)
Transmit an event with a float payload to all interested listeners.protected int
fireEvent(EventTypeInterface eventType, int value)
Transmit an event with an integer payload to all interested listeners.protected long
fireEvent(EventTypeInterface eventType, long value)
Transmit an event with a long payload to all interested listeners.protected short
fireEvent(EventTypeInterface eventType, short value)
Transmit an event with a short payload to all interested listeners.protected Serializable
fireEvent(EventTypeInterface eventType, Serializable value)
Transmit an event with a serializable object as payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
voidfireTimedEvent(TimedEventInterface<C> event)
Transmit a timed event to all interested listeners.protected <C extends Comparable<C> & Serializable>
booleanfireTimedEvent(TimedEventTypeInterface eventType, boolean value, C time)
Transmit a time-stamped event with a boolean payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
bytefireTimedEvent(TimedEventTypeInterface eventType, byte value, C time)
Transmit a time-stamped event with a one byte payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
charfireTimedEvent(TimedEventTypeInterface eventType, char value, C time)
Transmit a time-stamped event with a one char payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
doublefireTimedEvent(TimedEventTypeInterface eventType, double value, C time)
Transmit a time-stamped event with a double value payload to interested listeners.protected <C extends Comparable<C> & Serializable>
floatfireTimedEvent(TimedEventTypeInterface eventType, float value, C time)
Transmit a time-stamped event with a float payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
intfireTimedEvent(TimedEventTypeInterface eventType, int value, C time)
Transmit a time-stamped event with an integer payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
longfireTimedEvent(TimedEventTypeInterface eventType, long value, C time)
Transmit a time-stamped event with a long payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
shortfireTimedEvent(TimedEventTypeInterface eventType, short value, C time)
Transmit a time-stamped event with a short payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
SerializablefireTimedEvent(TimedEventTypeInterface eventType, Serializable value, C time)
Transmit a time-stamped event with a Serializable object (payload) to all interested listeners.protected void
fireUnverifiedEvent(EventInterface event)
Transmit an event to all interested listeners.protected void
fireUnverifiedEvent(EventTypeInterface eventType)
Transmit an event that is not verified with no payload object to all interested listeners.protected boolean
fireUnverifiedEvent(EventTypeInterface eventType, boolean value)
Transmit an event that is not verified with a boolean payload to all interested listeners.protected byte
fireUnverifiedEvent(EventTypeInterface eventType, byte value)
Transmit an event that is not verified with a one byte payload to all interested listeners.protected char
fireUnverifiedEvent(EventTypeInterface eventType, char value)
Transmit an event that is not verified with a one char payload to all interested listeners.protected double
fireUnverifiedEvent(EventTypeInterface eventType, double value)
Transmit an event that is not verified with a double value payload to all interested listeners.protected float
fireUnverifiedEvent(EventTypeInterface eventType, float value)
Transmit an event that is not verified with a float payload to all interested listeners.protected int
fireUnverifiedEvent(EventTypeInterface eventType, int value)
Transmit an event that is not verified with an integer payload to all interested listeners.protected long
fireUnverifiedEvent(EventTypeInterface eventType, long value)
Transmit an event that is not verified with a long payload to all interested listeners.protected short
fireUnverifiedEvent(EventTypeInterface eventType, short value)
Transmit an event that is not verified with a short payload to all interested listeners.protected Serializable
fireUnverifiedEvent(EventTypeInterface eventType, Serializable value)
Transmit an event that is not verified with a serializable object as payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
voidfireUnverifiedTimedEvent(TimedEventInterface<C> event)
Transmit a timed event to all interested listeners.protected <C extends Comparable<C> & Serializable>
booleanfireUnverifiedTimedEvent(TimedEventTypeInterface eventType, boolean value, C time)
Transmit a time-stamped event that is not verified with a boolean payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
bytefireUnverifiedTimedEvent(TimedEventTypeInterface eventType, byte value, C time)
Transmit a time-stamped event that is not verified with a one byte payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
charfireUnverifiedTimedEvent(TimedEventTypeInterface eventType, char value, C time)
Transmit a time-stamped event that is not verified with a one char payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
doublefireUnverifiedTimedEvent(TimedEventTypeInterface eventType, double value, C time)
Transmit a time-stamped event that is not verified with a double value payload to interested listeners.protected <C extends Comparable<C> & Serializable>
floatfireUnverifiedTimedEvent(TimedEventTypeInterface eventType, float value, C time)
Transmit a time-stamped event that is not verified with a float payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
intfireUnverifiedTimedEvent(TimedEventTypeInterface eventType, int value, C time)
Transmit a time-stamped event that is not verified with an integer payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
longfireUnverifiedTimedEvent(TimedEventTypeInterface eventType, long value, C time)
Transmit a time-stamped event that is not verified with a long payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
shortfireUnverifiedTimedEvent(TimedEventTypeInterface eventType, short value, C time)
Transmit a time-stamped event that is not verified with a short payload to all interested listeners.protected <C extends Comparable<C> & Serializable>
voidfireUnverifiedTimedEvent(TimedEventTypeInterface eventType, C time)
Transmit a timed event that is not verified with no payload object to all interested listeners.protected <C extends Comparable<C> & Serializable>
SerializablefireUnverifiedTimedEvent(TimedEventTypeInterface eventType, Serializable value, C time)
Transmit a time-stamped event that is not verified with a Serializable object (payload) to all interested listeners.Set<EventTypeInterface>
getEventTypesWithListeners()
Return the EventTypeInterfaces for which the EventProducer has listeners.protected List<Reference<EventListenerInterface>>
getListenerReferences(EventTypeInterface eventType)
Return a safe copy of the list of (strong or weak) references to the registered listeners for the provided event type, or an empty list when nothing is registered for this event type.abstract Serializable
getSourceId()
Provide the sourceId that will be transmitted with the fired Event.boolean
hasListeners()
Return whether the EventProducer has listeners.int
numberOfListeners(EventTypeInterface eventType)
Return the number of listeners for the provided EventTypeInterface.protected int
removeAllListeners()
Remove all the listeners from this event producer.protected int
removeAllListeners(Class<?> ofClass)
Removes all the listeners of a class from this event producer.boolean
removeListener(EventListenerInterface listener, EventTypeInterface eventType)
Remove the subscription of a listener for a specific event.-
Methods inherited from class org.djutils.rmi.RMIObject
getRegistry, register
-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
-
-
-
Field Detail
-
eventProducerImpl
protected final EventProducerImpl eventProducerImpl
The EventProducer helper class with the actual implementation to avoid code duplication.
-
-
Constructor Detail
-
RemoteEventProducer
public RemoteEventProducer(String host, int port, String bindingKey) throws RemoteException, AlreadyBoundException
Create a remote event listener and register the listener in the RMI registry. When the RMI registry does not exist yet, it will be created, but only on the local host. Remote creation of a registry on another computer is not possible. Any attempt to do so will cause an AccessException to be fired.- Parameters:
host
- String; the host where the RMI registry resides or will be created. Creation is only possible on localhost.port
- int; the port where the RMI registry can be found or will be createdbindingKey
- String; the key under which this object will be bound in the RMI registry- Throws:
RemoteException
- when there is a problem with the RMI registryAlreadyBoundException
- when there is already another object bound to the bindingKeyNullPointerException
- when host, path, or bindingKey is nullIllegalArgumentException
- when port < 0 or port > 65535AccessException
- when there is an attempt to create a registry on a remote host
-
RemoteEventProducer
public RemoteEventProducer(URL registryURL, String bindingKey) throws RemoteException, AlreadyBoundException
Create a remote event listener and register the listener in the RMI registry. When the host has not been specified in the 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. When the RMI registry does not exist yet, it will be created, but only on the local host. Remote creation of a registry on another computer is not possible. Any attempt to do so will cause an AccessException to be fired.- Parameters:
registryURL
- URL; the URL of the registry, e.g., "http://localhost:1099" or "http://130.161.185.14:28452"bindingKey
- String; the key under which this object will be bound in the RMI registry- Throws:
RemoteException
- when there is a problem with the RMI registryAlreadyBoundException
- when there is already another object bound to the bindingKeyNullPointerException
- when registryURL or bindingKey is nullAccessException
- when there is an attempt to create a registry on a remote host
-
-
Method Detail
-
getSourceId
public abstract Serializable getSourceId()
Provide the sourceId that will be transmitted with the fired Event.- Specified by:
getSourceId
in interfaceEventProducerInterface
- Returns:
- Serializable; the sourceId that will be transmitted with the fired Event
-
addListener
public final boolean addListener(EventListenerInterface listener, EventTypeInterface eventType) throws RemoteException
Add a listener as strong reference to the BEGINNING of a queue of listeners.- Specified by:
addListener
in interfaceEventProducerInterface
- Parameters:
listener
- EventListenerInterface; the listener which is interested at events of eventTypeeventType
- EventTypeInterface; the events of interest- Returns:
- the success of adding the listener. If a listener was already added false is returned
- Throws:
RemoteException
- If a network connection failure occurs.
-
addListener
public final boolean addListener(EventListenerInterface listener, EventTypeInterface eventType, ReferenceType referenceType) throws RemoteException
Add a listener to the BEGINNING of a queue of listeners.- Specified by:
addListener
in interfaceEventProducerInterface
- Parameters:
listener
- EventListenerInterface; the listener which is interested at events of eventTypeeventType
- EventTypeInterface; the events of interestreferenceType
- ReferenceType; whether the listener is added as a strong or as a weak reference- Returns:
- the success of adding the listener. If a listener was already added false is returned
- Throws:
RemoteException
- If a network connection failure occurs.- See Also:
WeakReference
-
addListener
public final boolean addListener(EventListenerInterface listener, EventTypeInterface eventType, int position) throws RemoteException
Add a listener as strong reference to the specified position of a queue of listeners.- Specified by:
addListener
in interfaceEventProducerInterface
- Parameters:
listener
- EventListenerInterface; the listener which is interested at events of eventTypeeventType
- EventTypeInterface; the events of interestposition
- int; the position of the listener in the queue- Returns:
- the success of adding the listener. If a listener was already added, or an illegal position is provided false is returned
- Throws:
RemoteException
- If a network connection failure occurs.
-
addListener
public final boolean addListener(EventListenerInterface listener, EventTypeInterface eventType, int position, ReferenceType referenceType) throws RemoteException
Add a listener to the specified position of a queue of listeners.- Specified by:
addListener
in interfaceEventProducerInterface
- Parameters:
listener
- EventListenerInterface; which is interested at certain eventseventType
- EventTypeInterface; the events of interestposition
- int; the position of the listener in the queuereferenceType
- ReferenceType; whether the listener is added as a strong or as a weak reference- Returns:
- the success of adding the listener. If a listener was already added or an illegal position is provided false is returned
- Throws:
RemoteException
- If a network connection failure occurs.- See Also:
WeakReference
-
removeAllListeners
protected int removeAllListeners() throws RemoteException
Remove all the listeners from this event producer.- Returns:
- int; the number of removed event types
- Throws:
RemoteException
- on network failure
-
removeAllListeners
protected int removeAllListeners(Class<?> ofClass) throws RemoteException
Removes all the listeners of a class from this event producer.- Parameters:
ofClass
- Class<?>; the class or superclass- Returns:
- int; the number of removed listeners
- Throws:
RemoteException
- on network failure
-
removeListener
public final boolean removeListener(EventListenerInterface listener, EventTypeInterface eventType) throws RemoteException
Remove the subscription of a listener for a specific event.- Specified by:
removeListener
in interfaceEventProducerInterface
- Parameters:
listener
- EventListenerInterface; which is no longer interestedeventType
- EventTypeInterface; the event which is of no interest any more- Returns:
- the success of removing the listener. If a listener was not subscribed false is returned
- Throws:
RemoteException
- If a network connection failure occurs.
-
hasListeners
public boolean hasListeners() throws RemoteException
Return whether the EventProducer has listeners.- Specified by:
hasListeners
in interfaceEventProducerInterface
- Returns:
- boolean; whether the EventProducer has listeners or not
- Throws:
RemoteException
- If a network connection failure occurs.
-
numberOfListeners
public int numberOfListeners(EventTypeInterface eventType) throws RemoteException
Return the number of listeners for the provided EventTypeInterface.- Specified by:
numberOfListeners
in interfaceEventProducerInterface
- Parameters:
eventType
- EventTypeInterface; the event type to return the number of listeners for- Returns:
- boolean; whether the EventProducer has listeners or not
- Throws:
RemoteException
- If a network connection failure occurs.
-
getEventTypesWithListeners
public Set<EventTypeInterface> getEventTypesWithListeners() throws RemoteException
Return the EventTypeInterfaces for which the EventProducer has listeners.- Specified by:
getEventTypesWithListeners
in interfaceEventProducerInterface
- Returns:
- Set<EventTypeInterface>; the EventTypeInterfaces for which the EventProducer has registered listeners
- Throws:
RemoteException
- If a network connection failure occurs.
-
getListenerReferences
protected List<Reference<EventListenerInterface>> getListenerReferences(EventTypeInterface eventType)
Return a safe copy of the list of (strong or weak) references to the registered listeners for the provided event type, or an empty list when nothing is registered for this event type. The method never returns a null pointer, so it is safe to use the result directly in an iterator. The references to the listeners are the original references, so not safe copies.- Parameters:
eventType
- EventTypeInterface; the event type to look up the listeners for- Returns:
- List<Reference<EventListenerInterface>>; the list of references to the listeners for this event type, or an empty list when the event type is not registered
-
fireEvent
protected void fireEvent(EventInterface event) throws RemoteException
Transmit an event to all interested listeners.- Parameters:
event
- EventInterface; the event- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> void fireTimedEvent(TimedEventInterface<C> event) throws RemoteException
Transmit a timed event to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
event
- TimedEventInterface<C>; the timed event- Throws:
RemoteException
- on network failure
-
fireEvent
protected Serializable fireEvent(EventTypeInterface eventType, Serializable value) throws RemoteException
Transmit an event with a serializable object as payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- Serializable; the object sent with the event- Returns:
- Serializable; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected void fireEvent(EventTypeInterface eventType) throws RemoteException
Transmit an event with no payload object to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the event- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> Serializable fireTimedEvent(TimedEventTypeInterface eventType, Serializable value, C time) throws RemoteException
Transmit a time-stamped event with a Serializable object (payload) to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the event.value
- Serializable; the payload sent with the eventtime
- C; a time stamp for the event- Returns:
- Serializable; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected byte fireEvent(EventTypeInterface eventType, byte value) throws RemoteException
Transmit an event with a one byte payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- byte; the payload- Returns:
- byte; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> byte fireTimedEvent(TimedEventTypeInterface eventType, byte value, C time) throws RemoteException
Transmit a time-stamped event with a one byte payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- byte; the payloadtime
- C; a time stamp for the event- Returns:
- byte; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected char fireEvent(EventTypeInterface eventType, char value) throws RemoteException
Transmit an event with a one char payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- char; the payload- Returns:
- char; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> char fireTimedEvent(TimedEventTypeInterface eventType, char value, C time) throws RemoteException
Transmit a time-stamped event with a one char payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- char; the payloadtime
- C; a time stamp for the event- Returns:
- char; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected boolean fireEvent(EventTypeInterface eventType, boolean value) throws RemoteException
Transmit an event with a boolean payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- boolean; the payload- Returns:
- boolean; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> boolean fireTimedEvent(TimedEventTypeInterface eventType, boolean value, C time) throws RemoteException
Transmit a time-stamped event with a boolean payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- boolean; the payloadtime
- C; a time stamp for the event- Returns:
- boolean; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected double fireEvent(EventTypeInterface eventType, double value) throws RemoteException
Transmit an event with a double value payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- double; the payload- Returns:
- double; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> double fireTimedEvent(TimedEventTypeInterface eventType, double value, C time) throws RemoteException
Transmit a time-stamped event with a double value payload to interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- double; the payloadtime
- C; a time stamp for the event- Returns:
- double; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected int fireEvent(EventTypeInterface eventType, int value) throws RemoteException
Transmit an event with an integer payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- int; the payload- Returns:
- int; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> int fireTimedEvent(TimedEventTypeInterface eventType, int value, C time) throws RemoteException
Transmit a time-stamped event with an integer payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- int; the payloadtime
- C; a time stamp for the event- Returns:
- int; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected long fireEvent(EventTypeInterface eventType, long value) throws RemoteException
Transmit an event with a long payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- long; the payload- Returns:
- long; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> long fireTimedEvent(TimedEventTypeInterface eventType, long value, C time) throws RemoteException
Transmit a time-stamped event with a long payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- long; the payloadtime
- C; a time stamp for the event- Returns:
- long; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected short fireEvent(EventTypeInterface eventType, short value) throws RemoteException
Transmit an event with a short payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- short; the payload- Returns:
- short; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> short fireTimedEvent(TimedEventTypeInterface eventType, short value, C time) throws RemoteException
Transmit a time-stamped event with a short payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- short; the payloadtime
- C; a time stamp for the event- Returns:
- short; the payload
- Throws:
RemoteException
- on network failure
-
fireEvent
protected float fireEvent(EventTypeInterface eventType, float value) throws RemoteException
Transmit an event with a float payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- float; the payload- Returns:
- float; the payload
- Throws:
RemoteException
- on network failure
-
fireTimedEvent
protected <C extends Comparable<C> & Serializable> float fireTimedEvent(TimedEventTypeInterface eventType, float value, C time) throws RemoteException
Transmit a time-stamped event with a float payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- float; the payloadtime
- C; a time stamp for the event- Returns:
- float; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected void fireUnverifiedEvent(EventInterface event) throws RemoteException
Transmit an event to all interested listeners.- Parameters:
event
- EventInterface; the event- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> void fireUnverifiedTimedEvent(TimedEventInterface<C> event) throws RemoteException
Transmit a timed event to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
event
- TimedEventInterface<C>; the timed event- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected void fireUnverifiedEvent(EventTypeInterface eventType) throws RemoteException
Transmit an event that is not verified with no payload object to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the event- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> void fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, C time) throws RemoteException
Transmit a timed event that is not verified with no payload object to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventtime
- C; a time stamp for the event- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected Serializable fireUnverifiedEvent(EventTypeInterface eventType, Serializable value) throws RemoteException
Transmit an event that is not verified with a serializable object as payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- Serializable; the object sent with the event- Returns:
- Serializable; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> Serializable fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, Serializable value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a Serializable object (payload) to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the event.value
- Serializable; the payload sent with the eventtime
- C; a time stamp for the event- Returns:
- Serializable; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected byte fireUnverifiedEvent(EventTypeInterface eventType, byte value) throws RemoteException
Transmit an event that is not verified with a one byte payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- byte; the payload- Returns:
- byte; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> byte fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, byte value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a one byte payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- byte; the payloadtime
- C; a time stamp for the event- Returns:
- byte; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected char fireUnverifiedEvent(EventTypeInterface eventType, char value) throws RemoteException
Transmit an event that is not verified with a one char payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- char; the payload- Returns:
- char; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> char fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, char value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a one char payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- char; the payloadtime
- C; a time stamp for the event- Returns:
- char; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected boolean fireUnverifiedEvent(EventTypeInterface eventType, boolean value) throws RemoteException
Transmit an event that is not verified with a boolean payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- boolean; the payload- Returns:
- boolean; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> boolean fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, boolean value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a boolean payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- boolean; the payloadtime
- C; a time stamp for the event- Returns:
- boolean; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected double fireUnverifiedEvent(EventTypeInterface eventType, double value) throws RemoteException
Transmit an event that is not verified with a double value payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- double; the payload- Returns:
- double; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> double fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, double value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a double value payload to interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- double; the payloadtime
- C; a time stamp for the event- Returns:
- double; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected int fireUnverifiedEvent(EventTypeInterface eventType, int value) throws RemoteException
Transmit an event that is not verified with an integer payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- int; the payload- Returns:
- int; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> int fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, int value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with an integer payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- int; the payloadtime
- C; a time stamp for the event- Returns:
- int; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected long fireUnverifiedEvent(EventTypeInterface eventType, long value) throws RemoteException
Transmit an event that is not verified with a long payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- long; the payload- Returns:
- long; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> long fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, long value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a long payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- long; the payloadtime
- C; a time stamp for the event- Returns:
- long; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected short fireUnverifiedEvent(EventTypeInterface eventType, short value) throws RemoteException
Transmit an event that is not verified with a short payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- short; the payload- Returns:
- short; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> short fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, short value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a short payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- short; the payloadtime
- C; a time stamp for the event- Returns:
- short; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedEvent
protected float fireUnverifiedEvent(EventTypeInterface eventType, float value) throws RemoteException
Transmit an event that is not verified with a float payload to all interested listeners.- Parameters:
eventType
- EventTypeInterface; the eventType of the eventvalue
- float; the payload- Returns:
- float; the payload
- Throws:
RemoteException
- on network failure
-
fireUnverifiedTimedEvent
protected <C extends Comparable<C> & Serializable> float fireUnverifiedTimedEvent(TimedEventTypeInterface eventType, float value, C time) throws RemoteException
Transmit a time-stamped event that is not verified with a float payload to all interested listeners.- Type Parameters:
C
- the comparable type to indicate the time when the event is fired- Parameters:
eventType
- TimedEventTypeInterface; the eventType of the eventvalue
- float; the payloadtime
- C; a time stamp for the event- Returns:
- float; the payload
- Throws:
RemoteException
- on network failure
-
-