org.objectweb.fractal.julia.control.binding
Interface ContentBindingController


public interface ContentBindingController

A component interface to control the bindings of the content of container components. This interface is useful when a container and its encapsulated "user" component are merged into a single class. Indeed, in this case, the container class is generated as a sub class of the user component class, and may therefore override the binding management methods that may be provided by the user component (because both classes may implement the same BindingController interface). In order to still be able to call the user component binding management methods from outside the component, four new methods are generated in the container class, that just calls the corresponding methods in the user component class (i.e., in the super class) with the super keyword.


Method Summary
 void bindFcContent(String clientItfName, Object serverItf)
          Calls the bindFc method on the component encapsulated in this container.
 String[] listFcContent()
          Calls the listFc method on the component encapsulated in this container.
 Object lookupFcContent(String clientItfName)
          Calls the lookupFc method on the component encapsulated in this container.
 void unbindFcContent(String clientItfName)
          Calls the unbindFc method on the component encapsulated in this container.
 

Method Detail

listFcContent

String[] listFcContent()
Calls the listFc method on the component encapsulated in this container.

Returns:
the names of the client interfaces of the component to which this interface belongs.

lookupFcContent

Object lookupFcContent(String clientItfName)
                       throws NoSuchInterfaceException
Calls the lookupFc method on the component encapsulated in this container.

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.

bindFcContent

void bindFcContent(String clientItfName,
                   Object serverItf)
                   throws NoSuchInterfaceException,
                          IllegalBindingException,
                          IllegalLifeCycleException
Calls the bindFc method on the component encapsulated in this container.

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

unbindFcContent

void unbindFcContent(String clientItfName)
                     throws NoSuchInterfaceException,
                            IllegalBindingException,
                            IllegalLifeCycleException
Calls the unbindFc method on the component encapsulated in this container.

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.