public class DefaultOutRouteConfigurator extends Object implements OutRouteConfigurator
Activatable.State
Constructor and Description |
---|
DefaultOutRouteConfigurator(Scope scope)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates all resources that belong to a specific object.
|
void |
addConnector(OutConnector connector)
Adds a connector which will subsequently be used for for sending events.
|
void |
deactivate()
Deactivate all resources that are owned by a specific object in order to
correctly tear down.
|
Set<URI> |
getTransportUris()
Returns URIs describing the transports configured for this configurator.
|
boolean |
isActive()
Tells whether this class is currently active or not.
|
void |
publishSync(Event event)
Sends an event.
|
boolean |
removeConnector(OutConnector connector)
Removes a connector, which will not receive events for sending
afterwards.
|
public DefaultOutRouteConfigurator(Scope scope)
scope
- the scope the out route operates onpublic 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 boolean isActive()
Activatable
isActive
in interface Activatable
true
if activepublic void addConnector(OutConnector connector)
RouteConfigurator
Activatable.activate()
.addConnector
in interface RouteConfigurator<OutConnector>
connector
- connector to addpublic boolean removeConnector(OutConnector connector)
RouteConfigurator
Activatable.activate()
.removeConnector
in interface RouteConfigurator<OutConnector>
connector
- the connector to removetrue
if the connector was previously installed and
hence remove now, else false
public void publishSync(Event event) throws RSBException
OutRouteConfigurator
Activatable.activate()
.publishSync
in interface OutRouteConfigurator
event
- event to sendRSBException
- sending error. e.g. impossible to convert data, transport
errorpublic Set<URI> getTransportUris()
RouteConfigurator
getTransportUris
in interface RouteConfigurator<OutConnector>
null
Copyright © 2018 CoR-Lab. All rights reserved.