Top Description Fields Methods
org.osgi.service.dal.functions

public Interface BooleanControl

extends Function
Imports
org.osgi.service.dal.DeviceException, .Function, org.osgi.service.dal.functions.data.BooleanData

BooleanControl function provides a boolean control support. The eventable function state is accessible with getData() getter and setData(boolean) setter. The state can be reversed with inverse() method, can be set to true value with setTrue() method and can be set to false value with setFalse() method.

The control type can be:

See Also
BooleanData

Field Summary

Modifier and TypeField and Description
public static final String
OPERATION_INVERSE

Specifies the inverse operation name.

public static final String
OPERATION_SET_FALSE

Specifies the operation name, which sets the control state to false value.

public static final String
OPERATION_SET_TRUE

Specifies the operation name, which sets the control state to true value.

public static final String
PROPERTY_DATA

Specifies the state property name.

Inherited from org.osgi.service.dal.Function:
SERVICE_DESCRIPTIONSERVICE_DEVICE_UIDSERVICE_OPERATION_NAMESSERVICE_PROPERTY_NAMESSERVICE_REFERENCE_UIDSSERVICE_TYPESERVICE_UIDSERVICE_VERSION

Method Summary

Modifier and TypeMethod and Description
public BooleanData

Returns:

The current state of BooleanControl.
getData
()

Returns the current state of BooleanControl.

public void
inverse()

Reverses the BooleanControl state.

public void
setData(boolean
The new function value.
data
)

Sets the BooleanControl state to the specified value.

public void
setFalse()

Sets the BooleanControl state to false value.

public void
setTrue()

Sets the BooleanControl state to true value.

Inherited from org.osgi.service.dal.Function:
getOperationMetadatagetPropertyMetadatagetServicePropertygetServicePropertyKeys

Field Detail

OPERATION_INVERSEback to summary
public static final String OPERATION_INVERSE

Specifies the inverse operation name. The operation can be executed with inverse() method.

OPERATION_SET_FALSEback to summary
public static final String OPERATION_SET_FALSE

Specifies the operation name, which sets the control state to false value. The operation can be executed with setFalse() method.

OPERATION_SET_TRUEback to summary
public static final String OPERATION_SET_TRUE

Specifies the operation name, which sets the control state to true value. The operation can be executed with setTrue() method.

PROPERTY_DATAback to summary
public static final String PROPERTY_DATA

Specifies the state property name. The eventable property value is accessible with getData() method.

See Also
BooleanData

Method Detail

getDataback to summary
public BooleanData getData() throws DeviceException

Returns the current state of BooleanControl. It's a getter method for PROPERTY_DATA property.

Returns:BooleanData

The current state of BooleanControl.

Exceptions
DeviceException:
If an operation error is available.
IllegalStateException:
If this function service object has already been unregistered.
See Also
BooleanData, BooleanControl#PROPERTY_DATA
inverseback to summary
public void inverse() throws DeviceException

Reverses the BooleanControl state. If the current state represents true value, it'll be changed to false. If the current state represents false value, it'll be changed to true. The operation name is OPERATION_INVERSE.

Exceptions
DeviceException:
If an operation error is available.
IllegalStateException:
If this function service object has already been unregistered.
setDataback to summary
public void setData(boolean data) throws DeviceException

Sets the BooleanControl state to the specified value. It's setter method for PROPERTY_DATA property.

Parameters
data:boolean

The new function value.

Exceptions
DeviceException:
If an operation error is available.
IllegalStateException:
If this function service object has already been unregistered.
IllegalArgumentException:
If there is an invalid argument.
See Also
BooleanControl#PROPERTY_DATA
setFalseback to summary
public void setFalse() throws DeviceException

Sets the BooleanControl state to false value. The operation name is OPERATION_SET_FALSE.

Exceptions
DeviceException:
If an operation error is available.
IllegalStateException:
If this function service object has already been unregistered.
setTrueback to summary
public void setTrue() throws DeviceException

Sets the BooleanControl state to true value. The operation name is OPERATION_SET_TRUE.

Exceptions
DeviceException:
If an operation error is available.
IllegalStateException:
If this function service object has already been unregistered.