public class Informer<T> extends Participant
Modifier and Type | Class and Description |
---|---|
protected class |
Informer.InformerStateActive |
protected class |
Informer.InformerStateInactive |
Modifier and Type | Field and Description |
---|---|
protected ConverterSelectionStrategy<?> |
converter
converter repository for type mappings
|
protected SequenceNumber |
sequenceNumber
atomic uint32 counter object for event sequence numbers
|
protected InformerState<T> |
state
state variable for publisher instance
|
protected java.lang.Class<?> |
type
default data type for this publisher
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates all network resources that belong to a specific object.
|
void |
deactivate()
Deactivate all network resources that are owned by a specific object in
order to reactivate it.
|
java.lang.Class<?> |
getTypeInfo()
Returns the class describing the type of data sent by this informer.
|
boolean |
isActive()
Tells wether this class is currently active or not.
|
Event |
send(Event event)
Send an
Event to all subscribed participants. |
Event |
send(T data)
Send data (of type
|
void |
setTypeInfo(java.lang.Class<?> typeInfo)
Set the class object describing the type of data sent by this informer.
|
getId, getRouter, getScope, getTransportFactory
protected InformerState<T> state
protected SequenceNumber sequenceNumber
protected ConverterSelectionStrategy<?> converter
protected java.lang.Class<?> type
public void activate() throws InitializeException
RSBObject
InitializeException
public void deactivate()
RSBObject
public Event send(Event event) throws RSBException
Event
to all subscribed participants.event
- the event to sendRSBException
- error sending eventjava.lang.IllegalArgumentException
- if the event is not complete or does not match the type or
scope settings of the informerpublic Event send(T data) throws RSBException
data
- data to send with default setting from the informerRSBException
- error sending eventpublic java.lang.Class<?> getTypeInfo()
public void setTypeInfo(java.lang.Class<?> typeInfo)
public boolean isActive()
RSBObject
true
if active