org.sandev.basics.nodecommon
Interface ControlWrapper

All Known Implementing Classes:
AuthorizerNodeCtrl, CacheManagerNodeCtrl, DataManagerNodeCtrl, MessageDriverNodeCtrl

public interface ControlWrapper

The ControlWrapper interface declares that the implementing class wraps a node for control purposes. Each node implements Controllable, which is how state transitions and parameter updates are managed internally. External control is accomplished by wrapping this internal mechanism inside of another class that handles the mapping to/from the external control technology.

A ControlWrapper calls through to the appropriate method(s) in the Controllable node. The node maintains a collection of wrappers and notifies all of them in the event of a state or parameter change. With bidirectional access, the system can (and does) support multiple simultaneous control interfaces.


Method Summary
 Controllable getControllable()
          Return the Controllable instance we are wrapping.
 void paramChanged(java.lang.String paramName)
          Accept the fact that one of the parameters has changed.
 void sandInitialize()
          Called once after construction and setControllable to signal that the instance should ready itself for work.
 void setControllable(Controllable node)
          Set the Controllable instance we are wrapping.
 void stateChanged(int prevState, int currState)
          Accept the fact that the state has changed.
 

Method Detail

stateChanged

void stateChanged(int prevState,
                  int currState)
Accept the fact that the state has changed.


paramChanged

void paramChanged(java.lang.String paramName)
Accept the fact that one of the parameters has changed.


setControllable

void setControllable(Controllable node)
Set the Controllable instance we are wrapping.


getControllable

Controllable getControllable()
Return the Controllable instance we are wrapping.


sandInitialize

void sandInitialize()
                    throws ControlWrapperException
Called once after construction and setControllable to signal that the instance should ready itself for work.

Throws:
ControlWrapperException