DataType
- The type of data sent by this informerpublic class Informer<DataType> extends Participant
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates all resources that belong to a specific object.
|
void |
deactivate()
Deactivate all resources that are owned by a specific object in order to
correctly tear down.
|
Class<?> |
getDataType()
Returns the data type transfered by this participant.
|
String |
getKind()
Returns kind of participant in RSB terminology.
|
Set<URI> |
getTransportUris()
Returns URIs describing the transports configured for this participants.
|
Class<?> |
getTypeInfo()
Returns the class describing the type of data sent by this informer.
|
boolean |
isActive()
Tells whether this class is currently active or not.
|
Event |
publish(DataType data)
Publish data (of type DataType) to all subscribed participants.
|
Event |
publish(Event event)
Publish an
Event to all subscribed participants. |
Event |
send(DataType data)
Deprecated.
Use
publish(Object) instead to be consistent across
implementations |
Event |
send(Event event)
Deprecated.
Use
publish(Event) instead to be consistent across
implementations |
void |
setTypeInfo(Class<?> typeInfo)
Set the class object describing the type of data sent by this informer.
|
getConfig, getId, getObserverManager, getScope, setObserverManager
close
public void activate() throws RSBException
Activatable
activate
in interface Activatable
activate
in class Participant
RSBException
- generic error related to RSBpublic void deactivate() throws RSBException, InterruptedException
Activatable
deactivate
in interface Activatable
deactivate
in class Participant
RSBException
- generic error related to RSBInterruptedException
- interrupted while waiting for proper deactivation. Object
might be in an undefined state now@Deprecated public Event send(Event event) throws RSBException
publish(Event)
instead to be consistent across
implementationsEvent
to all subscribed participants.event
- the event to sendRSBException
- error sending eventIllegalArgumentException
- if the event is not complete or does not match the type or
scope settings of the informerpublic Event publish(Event event) throws RSBException
Event
to all subscribed participants.event
- the event to sendRSBException
- error sending eventIllegalArgumentException
- if the event is not complete or does not match the type or
scope settings of the informer@Deprecated public Event send(DataType data) throws RSBException
publish(Object)
instead to be consistent across
implementationsdata
- data to send with default setting from the informerRSBException
- error sending eventpublic Event publish(DataType data) throws RSBException
data
- data to send with default setting from the informerRSBException
- error sending eventpublic Class<?> getTypeInfo()
public void setTypeInfo(Class<?> typeInfo)
typeInfo
- a Class
instance describing the sent datapublic boolean isActive()
Activatable
true
if activepublic String getKind()
Participant
getKind
in class Participant
public Class<?> getDataType()
Participant
getDataType
in class Participant
null
if not applicable for this type of
participantpublic Set<URI> getTransportUris()
Participant
getTransportUris
in class Participant
null
Copyright © 2018 CoR-Lab. All rights reserved.