org.objectweb.fractal.julia.control.binding
Class ContainerBindingControllerMixin

java.lang.Object
  extended byorg.objectweb.fractal.julia.control.binding.ContainerBindingControllerMixin
All Implemented Interfaces:
BindingController, Controller

public abstract class ContainerBindingControllerMixin
extends Object
implements Controller, BindingController

Provides a container based implementation of the BindingController interface. This mixin implements the BindingController methods through delegation to the encapsulated "user component".

Requirements


Field Summary
 Object fcContent
          The "user component" encapsulated in this container component.
 
Method Summary
abstract  void _super_initFcController(InitializationContext i)
          The initFcController method overriden by this mixin.
 void bindFc(String clientItfName, Object serverItf)
          Binds the client interface whose name is given to a server interface.
 void initFcController(InitializationContext ic)
          Initializes the fields of this mixin and then calls the overriden method.
 String[] listFc()
          Returns the names of the client interfaces of the component to which this interface belongs.
 Object lookupFc(String clientItfName)
          Returns the interface to which the given client interface is bound.
 void unbindFc(String clientItfName)
          Unbinds the given client interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fcContent

public Object fcContent
The "user component" encapsulated in this container component.

Method Detail

initFcController

public void initFcController(InitializationContext ic)
                      throws InstantiationException
Initializes the fields of this mixin and then calls the overriden method.

Specified by:
initFcController in interface Controller
Parameters:
ic - information about the component to which this controller object belongs.
Throws:
InstantiationException - if the initialization fails.

listFc

public String[] listFc()
Description copied from interface: BindingController
Returns the names of the client interfaces of the component to which this interface belongs.

Specified by:
listFc in interface BindingController
Returns:
the names of the client interfaces of the component to which this interface belongs.

lookupFc

public Object lookupFc(String clientItfName)
                throws NoSuchInterfaceException
Description copied from interface: BindingController
Returns the interface to which the given client interface is bound. More precisely, returns the server interface to which the client interface whose name is given is bound. This server interface is necessarily in the same address space as the client interface (see bindFc).

Specified by:
lookupFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.
Returns:
the server interface to which the given interface is bound, or null if it is not bound.
Throws:
NoSuchInterfaceException - if the component to which this interface belongs does not have a client interface whose name is equal to the given name.

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
Description copied from interface: BindingController
Binds the client interface whose name is given to a server interface. More precisely, binds the client interface of the component to which this interface belongs, and whose name is equal to the given name, to the given server interface. The given server interface must be in the same address space as the client interface.

Specified by:
bindFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.
serverItf - a server interface.
Throws:
IllegalLifeCycleException - if this component has a LifeCycleController interface, but it is not in an appropriate state to perform this operation.
NoSuchInterfaceException - if there is no such client interface.
IllegalBindingException - if the binding cannot be created.

unbindFc

public void unbindFc(String clientItfName)
              throws NoSuchInterfaceException,
                     IllegalBindingException,
                     IllegalLifeCycleException
Description copied from interface: BindingController
Unbinds the given client interface. More precisely, unbinds the client interface of the component to which this interface belongs, and whose name is equal to the given name.

Specified by:
unbindFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.
Throws:
NoSuchInterfaceException - if there is no such client interface.
IllegalBindingException - if the binding cannot be removed.
IllegalLifeCycleException - if this component has a LifeCycleController interface, but it is not in an appropriate state to perform this operation.

_super_initFcController

public abstract void _super_initFcController(InitializationContext i)
                                      throws InstantiationException
The initFcController method overriden by this mixin.

Throws:
InstantiationException