public class Units extends Object
| Constructor and Description |
|---|
Units() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(UnitRemote<? extends com.google.protobuf.GeneratedMessage> unitRemote)
Method checks if the given unitRemote is managed by this unit remote pool.
|
static Future<UnitRemote<?>> |
getFutureUnit(String unitId,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit identifier.
|
static <UR extends UnitRemote<?>> |
getFutureUnit(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 Future<UnitRemote<?>> |
getFutureUnit(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<?>> |
getFutureUnit(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 Future<UnitRemote> |
getFutureUnitByLabel(String label,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit label.
|
static <UR extends UnitRemote<?>> |
getFutureUnitByLabel(String label,
boolean waitForData,
Class<UR> unitRemoteClass)
This method is a wrapper for
getUnit(String, boolean) and casts the result to the given unitRemoteClass. |
Future<UnitRemote<?>> |
getFutureUnitByLabelAndLocationScope(String label,
String locationScope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit label and location scope.
|
static Future<UnitRemote> |
getFutureUnitByLabelAndType(String label,
rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType unitType,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit label.
|
static Future<UnitRemote<?>> |
getFutureUnitByScope(rsb.Scope scope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit scope.
|
static Future<UnitRemote<?>> |
getFutureUnitByScope(rst.rsb.ScopeType.Scope scope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit scope.
|
static Future<UnitRemote<?>> |
getFutureUnitByScope(String scope,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit scope.
|
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.
|
static <UR extends UnitRemote<?>> |
getUnitByLabel(String label,
boolean waitForData,
Class<UR> unitRemoteClass)
This method is a wrapper for
getUnit(String, boolean) and casts the result to the given unitRemoteClass. |
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<?> |
getUnitByLabelAndType(String label,
rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType unitType,
boolean waitForData)
Method establishes a connection to the unit referred by the given unit label.
|
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.
|
static rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType |
getUnitTypeByRemoteClass(Class<? extends UnitRemote<?>> unitRemoteClass)
Method resolves the UnitType of the given unit remote class.
|
public static final Class<? extends AgentRemote> BASE_UNIT_AGENT
public static final Class<? extends SceneRemote> BASE_UNIT_SCENE
public static final Class<? extends UserRemote> BASE_UNIT_USER
public static final Class<? extends DeviceRemote> BASE_UNIT_DEVICE
public static final Class<? extends LocationRemote> BASE_UNIT_LOCATION
public static final Class<? extends ConnectionRemote> BASE_UNIT_CONNECTION
public static final Class<? extends ConnectionRemote> BASE_UNIT_CONNECTION_DOOR
public static final Class<? extends ConnectionRemote> BASE_UNIT_CONNECTION_WINDOW
public static final Class<? extends ConnectionRemote> BASE_UNIT_CONNECTION_PASSAGE
public static final Class<? extends AgentRemote> UNIT_BASE_AGENT
public static final Class<? extends SceneRemote> UNIT_BASE_SCENE
public static final Class<? extends UserRemote> UNIT_BASE_USER
public static final Class<? extends DeviceRemote> UNIT_BASE_DEVICE
public static final Class<? extends LocationRemote> UNIT_BASE_LOCATION
public static final Class<? extends ConnectionRemote> UNIT_BASE_CONNECTION
public static final Class<? extends ConnectionRemote> UNIT_BASE_CONNECTION_DOOR
public static final Class<? extends ConnectionRemote> UNIT_BASE_CONNECTION_WINDOW
public static final Class<? extends ConnectionRemote> UNIT_BASE_CONNECTION_PASSAGE
public static final Class<? extends AgentRemote> AGENT
public static final Class<? extends SceneRemote> SCENE
public static final Class<? extends UserRemote> USER
public static final Class<? extends DeviceRemote> DEVICE
public static final Class<? extends LocationRemote> LOCATION
public static final Class<? extends ConnectionRemote> DOOR
public static final Class<? extends ConnectionRemote> WINDOW
public static final Class<? extends ConnectionRemote> PASSAGE
public static final Class<? extends ConnectionRemote> CONNECTION
public static final Class<? extends LightRemote> DAL_UNIT_LIGHT
public static final Class<? extends ColorableLightRemote> DAL_UNIT_COLORABLE_LIGHT
public static final Class<? extends DimmableLightRemote> DAL_UNIT_DIMMABLE_LIGHT
public static final Class<? extends MotionDetectorRemote> DAL_UNIT_MOTION_DETECTOR
public static final Class<? extends PowerSwitchRemote> DAL_UNIT_POWER_SWITCH
public static final Class<? extends PowerConsumptionSensorRemote> DAL_UNIT_POWER_CONSUMPTION_SENSOR
public static final Class<? extends ButtonRemote> DAL_UNIT_BUTTON
public static final Class<? extends TemperatureControllerRemote> DAL_UNIT_TEMPERATURE_CONTROLLER
public static final Class<? extends TemperatureSensorRemote> DAL_UNIT_TEMPERATURE_SENSOR
public static final Class<? extends BatteryRemote> DAL_UNIT_BATTERY
public static final Class<? extends HandleRemote> DAL_UNIT_HANDLE
public static final Class<? extends MonitorRemote> DAL_UNIT_MONITOR
public static final Class<? extends ReedContactRemote> DAL_UNIT_REED_CONTACT
public static final Class<? extends RollerShutterRemote> DAL_UNIT_ROLLER_SHUTTER
public static final Class<? extends SmokeDetectorRemote> DAL_UNIT_SMOKE_DETECTOR
public static final Class<? extends TamperDetectorRemote> DAL_UNIT_TAMPER_DETECTOR
public static final Class<? extends LightRemote> UNIT_DAL_LIGHT
public static final Class<? extends ColorableLightRemote> UNIT_DAL_LIGHT_COLORABLE
public static final Class<? extends DimmableLightRemote> UNIT_DAL_LIGHT_DIMMABLE
public static final Class<? extends MotionDetectorRemote> UNIT_DAL_MOTION_DETECTOR
public static final Class<? extends PowerSwitchRemote> UNIT_DAL_POWER_SWITCH
public static final Class<? extends PowerConsumptionSensorRemote> UNIT_DAL_POWER_CONSUMPTION_SENSOR
public static final Class<? extends ButtonRemote> UNIT_DAL_BUTTON
public static final Class<? extends TemperatureControllerRemote> UNIT_DAL_TEMPERATURE_CONTROLLER
public static final Class<? extends TemperatureSensorRemote> UNIT_DAL_TEMPERATURE_SENSOR
public static final Class<? extends BatteryRemote> UNIT_DAL_BATTERY
public static final Class<? extends HandleRemote> UNIT_DAL_HANDLE
public static final Class<? extends MonitorRemote> UNIT_DAL_MONITOR
public static final Class<? extends ReedContactRemote> UNIT_DAL_REED_CONTACT
public static final Class<? extends RollerShutterRemote> UNIT_DAL_ROLLER_SHUTTER
public static final Class<? extends SmokeDetectorRemote> UNIT_DAL_SMOKE_DETECTOR
public static final Class<? extends TamperDetectorRemote> UNIT_DAL_TAMPER_DETECTOR
public static final Class<? extends LightRemote> LIGHT
public static final Class<? extends ColorableLightRemote> LIGHT_COLORABLE
public static final Class<? extends ColorableLightRemote> COLORABLE_LIGHT
public static final Class<? extends DimmableLightRemote> LIGHT_DIMMABLE
public static final Class<? extends DimmableLightRemote> DIMMABLE_LIGHT
public static final Class<? extends MotionDetectorRemote> MOTION_DETECTOR
public static final Class<? extends PowerSwitchRemote> POWER_SWITCH
public static final Class<? extends PowerConsumptionSensorRemote> POWER_CONSUMPTION_SENSOR
public static final Class<? extends ButtonRemote> BUTTON
public static final Class<? extends TemperatureControllerRemote> TEMPERATURE_CONTROLLER
public static final Class<? extends TemperatureSensorRemote> TEMPERATURE_SENSOR
public static final Class<? extends BatteryRemote> BATTERY
public static final Class<? extends HandleRemote> HANDLE
public static final Class<? extends MonitorRemote> MONITOR
public static final Class<? extends ReedContactRemote> REED_CONTACT
public static final Class<? extends RollerShutterRemote> ROLLER_SHUTTER
public static final Class<? extends SmokeDetectorRemote> SMOKE_DETECTOR
public static final Class<? extends TamperDetectorRemote> TAMPER_DETECTOR
public static Units instance
public static final org.openbase.jul.schedule.SyncObject UNIT_POOL_LOCK
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<?> getUnitByLabelAndType(String label, rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType unitType, 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.unitType - the type of 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<?> 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 <UR extends UnitRemote<?>> UR getUnitByLabel(String label, 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.label - 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)getUnitByLabel(java.lang.String, boolean)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 Future<UnitRemote<?>> getFutureUnit(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 Future<UnitRemote<?>> getFutureUnit(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<?>> Future<UR> getFutureUnit(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<?>> Future<UR> getFutureUnit(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 Future<UnitRemote> getFutureUnitByLabelAndType(String label, rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType unitType, 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.unitType - the type of 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 Future<UnitRemote> getFutureUnitByLabel(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 <UR extends UnitRemote<?>> Future<UR> getFutureUnitByLabel(String label, 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.label - 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)getUnitByLabel(java.lang.String, boolean)public static Future<UnitRemote<?>> getFutureUnitByScope(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 Future<UnitRemote<?>> getFutureUnitByScope(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 Future<UnitRemote<?>> getFutureUnitByScope(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 Future<UnitRemote<?>> getFutureUnitByLabelAndLocationScope(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 rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType getUnitTypeByRemoteClass(Class<? extends UnitRemote<?>> unitRemoteClass) throws org.openbase.jul.exception.CouldNotPerformException
unitRemoteClass - the unit remote class to resolve the unit type.org.openbase.jul.exception.CouldNotPerformException - is thrown in case if the UnitType could not be resolved.public static boolean contains(UnitRemote<? extends com.google.protobuf.GeneratedMessage> unitRemote) throws org.openbase.jul.exception.CouldNotPerformException
unitRemote - the remote to check.org.openbase.jul.exception.CouldNotPerformException - is thrown if the given remote is not valid. For instance if the given unit remote is not initialized.Copyright © 2014–2017 openbase.org. All rights reserved.