public class Units extends Object
| Constructor and Description |
|---|
Units() |
| Modifier and Type | Method and Description |
|---|---|
static LightRemote |
getLightUnit(rst.domotic.unit.UnitConfigType.UnitConfig unitConfig,
boolean waitForData) |
static UnitRemote |
getUnit(String unitId,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit identifier.
|
static <UR extends UnitRemote> |
getUnit(String unitId,
boolean waitForData,
Class<UR> unitRemoteClass)
This method is a wrapper for
getUnit(String, boolean) and casts the result to the given unitRemoteClass. |
static UnitRemote |
getUnit(rst.domotic.unit.UnitConfigType.UnitConfig unitConfig,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit identifier.
|
static <UR extends UnitRemote> |
getUnit(rst.domotic.unit.UnitConfigType.UnitConfig unitConfig,
boolean waitForData,
Class<UR> unitRemoteClass)
This method is a wrapper for
getUnit(UnitConfig, boolean) and casts the result to the given unitRemoteClass. |
static UnitRemote |
getUnitByLabel(String label,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit label.
|
UnitRemote |
getUnitByLabelAndLocationScope(String label,
String locationScope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit label and location scope.
|
static UnitRemote |
getUnitByScope(rsb.Scope scope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit scope.
|
static UnitRemote |
getUnitByScope(rst.rsb.ScopeType.Scope scope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit scope.
|
static UnitRemote |
getUnitByScope(String scope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit scope.
|
static org.openbase.bco.registry.unit.lib.UnitRegistry |
getUnitRegistry()
Method returns an instance of the unit registry.
|
public static Units instance
public static org.openbase.bco.registry.unit.lib.UnitRegistry getUnitRegistry()
throws InterruptedException,
org.openbase.jul.exception.CouldNotPerformException
Registries.getUnitRegistry();InterruptedException - is thrown if the current thread was externally interrupted.org.openbase.jul.exception.CouldNotPerformException - Is thrown in case an error occurs during registry connection.public static UnitRemote getUnit(String unitId, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
waitForData flag to block the current thread until the unit remote is fully synchronized with the unit controller during the startup phase.
This synchronization is just done once and the current thread will not block if the unit remote was already synchronized before.
To force a resynchronization call Remote.requestData() on the remote instance.
Please avoid polling unit states! If you want to get informed about unit config or unit data state changes, please register new config or data observer on this remote instance.unitId - the unit identifier.waitForData - if this flag is set to true the current thread will block until the unit remote is fully synchronized with the unit controller.org.openbase.jul.exception.NotAvailableException - is thrown in case the unit is not available.InterruptedException - is thrown in case the thread is externally interruptedpublic static UnitRemote getUnit(rst.domotic.unit.UnitConfigType.UnitConfig unitConfig, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
waitForData flag to block the current thread until the unit remote is fully synchronized with the unit controller during the startup phase.
This synchronization is just done once and the current thread will not block if the unit remote was already synchronized before.
To force a resynchronization call Remote.requestData() on the remote instance.
Please avoid polling unit states! If you want to get informed about unit config or unit data state changes, please register new config or data observer on this remote instance.unitConfig - the unit configuration.waitForData - if this flag is set to true the current thread will block until the unit remote is fully synchronized with the unit controller.org.openbase.jul.exception.NotAvailableException - is thrown in case the unit is not available.InterruptedException - is thrown in case the thread is externally interruptedpublic static <UR extends UnitRemote> UR getUnit(rst.domotic.unit.UnitConfigType.UnitConfig unitConfig, boolean waitForData, Class<UR> unitRemoteClass) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
getUnit(UnitConfig, boolean) and casts the result to the given unitRemoteClass.UR - the unit remote class type.unitConfig - Checkout wrapped method doc getUnit(UnitConfig, boolean)waitForData - Checkout wrapped method doc getUnit(UnitConfig, boolean)unitRemoteClass - the unit remote class.org.openbase.jul.exception.NotAvailableException - Is thrown if the remote instance is not compatible with the given class. See {getUnit(UnitConfig, boolean) for further cases.InterruptedException - Checkout wrapped method doc getUnit(UnitConfig, boolean)getUnit(rst.domotic.unit.UnitConfigType.UnitConfig, boolean)public static <UR extends UnitRemote> UR getUnit(String unitId, boolean waitForData, Class<UR> unitRemoteClass) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
getUnit(String, boolean) and casts the result to the given unitRemoteClass.UR - the unit remote class type.unitId - Checkout wrapped method doc getUnit(String, boolean)waitForData - Checkout wrapped method doc getUnit(String, boolean)unitRemoteClass - the unit remote class.org.openbase.jul.exception.NotAvailableException - Is thrown if the remote instance is not compatible with the given class. See getUnit(String, boolean) for further cases.InterruptedException - Checkout wrapped method doc getUnit(String, boolean)getUnit(java.lang.String, boolean)public static UnitRemote getUnitByLabel(String label, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
waitForData flag to block the current thread until the unit remote is fully synchronized with the unit controller during the startup phase.
This synchronization is just done once and the current thread will not block if the unit remote was already synchronized before.
To force a resynchronization call Remote.requestData() on the remote instance.
Please avoid polling unit states! If you want to get informed about unit config or unit data state changes, please register new config or data observer on this remote instance.label - the label to identify the unit.waitForData - if this flag is set to true the current thread will block until the unit remote is fully synchronized with the unit controller.org.openbase.jul.exception.NotAvailableException - is thrown in case the unit is not available or the label is not unique enough to identify the unit.InterruptedException - is thrown in case the thread is externally interrupted.public static UnitRemote getUnitByScope(rst.rsb.ScopeType.Scope scope, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
waitForData flag to block the current thread until the unit remote is fully synchronized with the unit controller during the startup phase.
This synchronization is just done once and the current thread will not block if the unit remote was already synchronized before.
To force a resynchronization call Remote.requestData() on the remote instance.
Please avoid polling unit states! If you want to get informed about unit config or unit data state changes, please register new config or data observer on this remote instance.scope - the scope to identify the unit.waitForData - if this flag is set to true the current thread will block until the unit remote is fully synchronized with the unit controller.org.openbase.jul.exception.NotAvailableException - is thrown in case the unit is not available or the label is not unique enough to identify the unit.InterruptedException - is thrown in case the thread is externally interrupted.public static UnitRemote getUnitByScope(rsb.Scope scope, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
waitForData flag to block the current thread until the unit remote is fully synchronized with the unit controller during the startup phase.
This synchronization is just done once and the current thread will not block if the unit remote was already synchronized before.
To force a resynchronization call Remote.requestData() on the remote instance.
Please avoid polling unit states! If you want to get informed about unit config or unit data state changes, please register new config or data observer on this remote instance.scope - the scope to identify the unit.waitForData - if this flag is set to true the current thread will block until the unit remote is fully synchronized with the unit controller.org.openbase.jul.exception.NotAvailableException - is thrown in case the unit is not available or the label is not unique enough to identify the unit.InterruptedException - is thrown in case the thread is externally interrupted.public static UnitRemote getUnitByScope(String scope, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
waitForData flag to block the current thread until the unit remote is fully synchronized with the unit controller during the startup phase.
This synchronization is just done once and the current thread will not block if the unit remote was already synchronized before.
To force a resynchronization call Remote.requestData() on the remote instance.
Please avoid polling unit states! If you want to get informed about unit config or unit data state changes, please register new config or data observer on this remote instance.scope - the scope to identify the unit.waitForData - if this flag is set to true the current thread will block until the unit remote is fully synchronized with the unit controller.org.openbase.jul.exception.NotAvailableException - is thrown in case the unit is not available or the label is not unique enough to identify the unit.InterruptedException - is thrown in case the thread is externally interrupted.public UnitRemote getUnitByLabelAndLocationScope(String label, String locationScope, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
waitForData flag to block the current thread until the unit remote is fully synchronized with the unit controller during the startup phase.
This synchronization is just done once and the current thread will not block if the unit remote was already synchronized before.
To force a resynchronization call Remote.requestData() on the remote instance.
Please avoid polling unit states! If you want to get informed about unit config or unit data state changes, please register new config or data observer on this remote instance.label - the label to identify the unit.locationScope - the location scope to identify the unit.waitForData - if this flag is set to true the current thread will block until the unit remote is fully synchronized with the unit controller.org.openbase.jul.exception.NotAvailableException - is thrown in case the unit is not available or the label is not unique enough to identify the unit.InterruptedException - is thrown in case the thread is externally interrupted.public static LightRemote getLightUnit(rst.domotic.unit.UnitConfigType.UnitConfig unitConfig, boolean waitForData) throws org.openbase.jul.exception.NotAvailableException, InterruptedException
org.openbase.jul.exception.NotAvailableExceptionInterruptedExceptionCopyright © 2014–2017 openbase.org. All rights reserved.