ConnectorType
- type of connectorspublic class RouteConfiguratorUtility<ConnectorType extends Connector> extends Object
RouteConfigurator
interface.Constructor and Description |
---|
RouteConfiguratorUtility(Scope scope)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate the managed connectors.
|
void |
addConnector(ConnectorType connector)
Adds a connector to use in this route.
|
void |
deactivate()
Deactivate the managed connectors.
|
List<ConnectorType> |
getConnectors()
Returns the connectors used on the managed route.
|
Set<URI> |
getTransportUris()
Utility method to implement
RouteConfigurator.getTransportUris() . |
boolean |
isActive()
Tells whether already activated.
|
boolean |
removeConnector(ConnectorType connector)
Removes a connector from the route if it existed.
|
public RouteConfiguratorUtility(Scope scope)
scope
- the managed route operates on this scopepublic void activate() throws RSBException
RSBException
- error activatingpublic void deactivate() throws RSBException, InterruptedException
RSBException
- error deactivatingInterruptedException
- interrupted while waiting for connectors to terminatepublic boolean isActive()
true
if activated, else false
public void addConnector(ConnectorType connector)
connector
- the connector to addpublic boolean removeConnector(ConnectorType connector)
connector
- the connector to removetrue
if the connector existedpublic List<ConnectorType> getConnectors()
public Set<URI> getTransportUris()
RouteConfigurator.getTransportUris()
.
Iterates all transports and returns their URIs.
Might only be possible, depending on the transports, if activated before.null
IllegalStateException
- not activatedCopyright © 2018 CoR-Lab. All rights reserved.