public abstract class Participant extends Object implements Activatable
activate()
and
deactivate()
are called in case these methods are overridden. Method
activate()
needs to be called once all required internal details are
set up and processing is possible now and deactivate()
needs to be
called before functionality is teared down.Activatable.State
Modifier | Constructor and Description |
---|---|
protected |
Participant(ParticipantCreateArgs<?> args)
Creates a new participant on the specified scope.
|
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.
|
ParticipantConfig |
getConfig()
Returns the
ParticipantConfig used for this participant. |
abstract Class<?> |
getDataType()
Returns the data type transfered by this participant.
|
ParticipantId |
getId()
Returns the unique ID of this participant.
|
abstract String |
getKind()
Returns kind of participant in RSB terminology.
|
protected Factory.ParticipantObserverManager |
getObserverManager()
Returns the observer manager to notify about participant changes.
|
Scope |
getScope()
Returns the scope of this participant.
|
abstract Set<URI> |
getTransportUris()
Returns URIs describing the transports configured for this participants.
|
void |
setObserverManager(Factory.ParticipantObserverManager observerManager)
Sets the observer manager to use for notifying deactivation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isActive
protected Participant(ParticipantCreateArgs<?> args)
args
- arguments used to create this participantpublic void activate() throws RSBException
Activatable
activate
in interface Activatable
RSBException
- generic error related to RSBpublic void deactivate() throws RSBException, InterruptedException
Activatable
deactivate
in interface Activatable
RSBException
- generic error related to RSBInterruptedException
- interrupted while waiting for proper deactivation. Object
might be in an undefined state nowpublic ParticipantId getId()
public Scope getScope()
null
public ParticipantConfig getConfig()
ParticipantConfig
used for this participant.null
protected Factory.ParticipantObserverManager getObserverManager()
null
public void setObserverManager(Factory.ParticipantObserverManager observerManager)
observerManager
- the observer manager to use or null
if not
requiredpublic abstract String getKind()
public abstract Class<?> getDataType()
null
if not applicable for this type of
participantpublic abstract Set<URI> getTransportUris()
null
IllegalStateException
- participant is in wrong state to get these URIsCopyright © 2018 CoR-Lab. All rights reserved.