kaos.core.csi.extension.state
Interface StateMonitor

All Superinterfaces:
KAoSExtensionComponent

public interface StateMonitor
extends KAoSExtensionComponent

Defines the operations for a class monitoring the state of an action. Properties of the monitored action are being updated with their current values and inquiries about the current state are being made. There is one instance of the StateMonitor for a given state class.

Author:
KAoS Team $Revision: 1.3 $

Method Summary
 OntInstanceDescription getCurrentState()
          Returns an OntInstanceDescription containing the name of the state class and a collection of OntPropertyDescriptions of properties currently monitored.
 kaos.ontology.repository.ActionClassDescription getStateDescription()
          Returns the state ClassDescription containing the name of the state class and a collection of names of properties as defined in the ontology.
 boolean isStateConformantWithMonitoredState(java.lang.String stateName)
          Check if the given state conforms with the monitored state.
 void removeProperty(java.lang.String propertyName)
          Remove the property with the given name from the collection of monitored properties.
 void updateProperty(java.lang.String propertyName, java.lang.String value, java.lang.Object valueDescription)
          Update property described by the given name, value, and value description (if any).
 
Methods inherited from interface kaos.core.csi.extension.KAoSExtensionComponent
addOntologicalAttribute, getEnabledStatus, getName, getOntologicalAttributes, setEnabledStatus, setName, setProperties
 

Method Detail

updateProperty

void updateProperty(java.lang.String propertyName,
                    java.lang.String value,
                    java.lang.Object valueDescription)
                    throws InvalidPropertyForMonitoredStateException
Update property described by the given name, value, and value description (if any). If the given property is not monitored currently, it will be added to the state.

Parameters:
propertyName - String, specifying the ontological name of the property.
value - String, specifying the value of the property.
valueDescription - Object containing the description of the value. Often it will be kaos.core.csi.OntInstanceDescription
Throws:
InvalidPropertyForMonitoredStateException - if the specified property is not a property of the monitored state (has no been defined in the ontology as the state property).

removeProperty

void removeProperty(java.lang.String propertyName)
                    throws InvalidPropertyForMonitoredStateException
Remove the property with the given name from the collection of monitored properties.

Parameters:
propertyName - String, specifying the name of property no longer to be monitored.
Throws:
InvalidPropertyForMonitoredStateException - if the specified property is not a property of the monitored state (has no been defined in the ontology as the state property).

getCurrentState

OntInstanceDescription getCurrentState()
Returns an OntInstanceDescription containing the name of the state class and a collection of OntPropertyDescriptions of properties currently monitored. This collection may be a subset of all properties defined in the ontology for the monitored state.

Returns:
OntInstanceDescription describing the monitored properties.

getStateDescription

kaos.ontology.repository.ActionClassDescription getStateDescription()
Returns the state ClassDescription containing the name of the state class and a collection of names of properties as defined in the ontology.

Returns:
ClassDescription describing the names of the state class to be monitored and names of its properties.

isStateConformantWithMonitoredState

boolean isStateConformantWithMonitoredState(java.lang.String stateName)
Check if the given state conforms with the monitored state. (ex. is a subclass of the monitored state, satisfies restrictions of the monitored state, etc. Concrete example: Monitored state is a ComputerState, given state is OverloadedComputerState, defined as a subclass of the ComputerState with property of a given memory usage. Based on the monitored properties, determine if the monitored state is OverloadedComputerState).

Parameters:
stateName - String containing the name of the state to be checked.
Returns:
boolean indicating if the given state conforms to the monitored state.


Copyright © 2006 IHMC All Rights Reserved.