com.ibm.portal.app.component
Interface Sensor
public interface Sensor
Sensor is one of the Application Component Interfaces, implemented by an
application component. Sensor is used to retrieve status information of
a component. This interface is used to collect predefined status information
like used storage size, last modification, last access and creation time.
Note: The component instance identifier input parameter used in
Sensor methods is the identifer returned by the
Lifecycle.createInstance(ListModel) or the
java.io.Reader, com.ibm.portal.ListModel)">Templatable.createFromTemplate(Reader, ListModel) method.
Note: Currently defined SensorData values and their unit:
SensorData Name |
Return Type |
Policy Unit |
SensorDataConstants.SIZE_SENSOR_DATA_NAME |
java.lang.Integer |
MB (MegaBytes) |
SensorDataConstants.LAST_ACCESSED_SENSOR_DATA_NAME |
java.util.Date |
days |
SensorDataConstants.LAST_MODIFIED_SENSOR_DATA_NAME |
java.util.Date |
days |
- Since:
- 6.0.1
Method Summary |
ListModel
| getSensorData(java.lang.String componentID,
ListModel sensorDataList)
The interface a component has to implement if it wants to support the retrieval of sensor data information.
|
getSensorData
ListModel getSensorData(java.lang.String componentID,
ListModel sensorDataList)
throws ComponentException
- The interface a component has to implement if it wants to support the retrieval of sensor data information.
A list will be passed in containing SensorData objects which define via their getName() method what data
has to be set to each object. Thereafter the updated list can be returned as result. SensorData information
that will not be supported should stay untouched. The sensor data value has to be set as a specific value
object type that differentiates between the SensorData objects. The type to pass can be retrieved by the method
getValueType(). For more information please @see SensorData!
- Parameters:
- componentID -
- sensorDataList - a ListModel that contains SensorData objects with empty values.
- Returns:
- list of current status information encapsulated in SensorData objects
- Throws:
- ComponentException - if the component is not able to create the result in the correct sense
- See Also:
- SensorData