org.objectweb.fractal.aokell.lib.control.attribute
Class AttributeControllerImpl
java.lang.Object
org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerImpl
- All Implemented Interfaces:
- AttributeControllerItf, Controller, AttributeController
public class AttributeControllerImpl
- extends Object
- implements AttributeControllerItf, Controller
Implementation of the attribute controller.
The role played by this class is very special in sense that when the
attribute controller is looked up on a component
(e.g. with aComp.getFcInterface("attribute-controller")
)
this is not this instance that is returned. Indeed the attribute controller
is defined in the component type with something like:
ComponentType sType = tf.createFcType(new InterfaceType[] {
tf.createFcItfType("s", "cs.impl.Service", false, false, false),
tf.createFcItfType(
"attribute-controller",
"cs.impl.ServiceAttributes",
false,
false,
false)
});
Hence the attribute controller is seen as a business server interface.
The goal of the current class is to provide an implementation for
cloneCtrl(). This method is called when a template is instantiated to
transfert the state of the attribute controller to the new instance.
- Author:
- Lionel Seinturier
Method Summary |
void |
cloneFcCtrl(Component dst,
Object hints)
Clone the controller state from the current component to another one. |
void |
initFcCtrl()
Initialize the controller. |
void |
setFcCompCtrl(Component compctrl)
Set the reference towards the component controller associated to this
controller. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttributeControllerImpl
public AttributeControllerImpl()
setFcCompCtrl
public void setFcCompCtrl(Component compctrl)
- Set the reference towards the component controller associated to this
controller.
- Specified by:
setFcCompCtrl
in interface Controller
initFcCtrl
public void initFcCtrl()
- Initialize the controller.
- Specified by:
initFcCtrl
in interface Controller
cloneFcCtrl
public void cloneFcCtrl(Component dst,
Object hints)
throws CloneCtrlException
- Clone the controller state from the current component to another one.
This method may receive some hints on how to do this, or provide some
hints on how this has been done. For instance, the hints may be a map
that is read and/or written by the controller. The raison d'etre of
these hints is that when its state is cloned, a controller may produce
results that are needed by other controllers.
- Specified by:
cloneFcCtrl
in interface Controller
- Parameters:
dst
- the destination componenthints
- hints for performing the operation
- Throws:
CloneCtrlException