|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ControlUnit
Control Unit is a object which provides formal representation of a certain
resource (device, software or hardware components, etc.) so it can be managed
in a uniform way by different applications.
The public interface of the Control Unit is represented by a set of
valued attributes called state variables and set of operations
called actions.
A Control Unit instance is characterized by its type and
id. The type of a Control Unit defines its allowed set of state
variables and actions. The id of the Control Unit instance identifies it uniquely
in the scope of its type.
A Control Unit instance can be exported (made available) to the management applications
either by registering ManagedControlUnit, which represents single
control unit instance or by registering a ControlUnitFactory
service, which maintains a set of Control Unit instances of the same type.
Control Units may be arranged hierarchically - every control unit instance may have one or
more sub control units and one or more parent control units. The implementors of the
Control Units must avoid cycles in the Control Unit hierarchy. Organizing Control Units
may be convenient for logical grouping of Control Units, but is especially useful for
representing more complex resources - devices, hardware and software systems, which may be
decomposed to a hierarchy of sub-components, achieving arbitrary level of granularity.
| Method Summary | |
|---|---|
java.lang.String |
getId()
Returns id of the control unit which uniquely identifies it in the scope of its parent. |
java.lang.String |
getType()
Returns type of the control unit. |
java.lang.Object |
invokeAction(java.lang.String actionID,
java.lang.Object arguments)
Executes the specified action over this control unit. |
java.lang.Object |
queryStateVariable(java.lang.String stateVariableID)
Returns the value of a specified state variable. |
| Method Detail |
|---|
java.lang.String getId()
java.lang.String getType()
java.lang.Object queryStateVariable(java.lang.String stateVariableID)
stateVariableID - the id of the variable
java.lang.IllegalArgumentException - if this control unit does not have
a state variable with the given id
java.lang.Object invokeAction(java.lang.String actionID,
java.lang.Object arguments)
throws java.lang.Exception
actionID - the id of the actionarguments - the input argument(s). If the argument is only one this is
the argument itself. If the arguments are more then one, the
value must be a Object[] and arguments are retrieved
from that array.
null if the action does not
return value.
java.lang.Exception - if an error occurs while executing action.
java.lang.IllegalArgumentException - if this control unit does not have action
with the supplied Id or the arguments number and/or types do not match the
action arguments.
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||