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

java.lang.Object
  extended by org.objectweb.fractal.julia.control.binding.TypeBindingMixin
All Implemented Interfaces:
BindingController

public abstract class TypeBindingMixin
extends Object
implements BindingController

Provides basic type system related checks to a BindingController.

Requirements


Field Summary
 Component _this_weaveableC
          The weaveableC field required by this mixin.
 
Method Summary
abstract  void _super_bindFc(String clientItfName, Object serverItf)
          The bindFc method overriden by this mixin.
abstract  Object _super_lookupFc(String clientItfName)
          The lookupFc method overriden by this mixin.
abstract  void _super_unbindFc(String clientItfName)
          The unbindFc method overriden by this mixin.
 void bindFc(InterfaceType clientItfType, String clientItfName, Object serverItf)
          Binds the client interface whose name is given to a server interface.
 void bindFc(String clientItfName, Object serverItf)
          Checks the interface name with the component's type and then calls the bindFc method.
 Object lookupFc(InterfaceType clientItfType, String clientItfName)
          Returns the interface to which the given client interface is bound.
 Object lookupFc(String clientItfName)
          Checks the interface name with the component's type and then calls the lookupFc method.
 void unbindFc(InterfaceType clientItfType, String clientItfName)
          Unbinds the given client interface.
 void unbindFc(String clientItfName)
          Checks the interface name with the component's type and then calls the unbindFc method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.fractal.api.control.BindingController
listFc
 

Field Detail

_this_weaveableC

public Component _this_weaveableC
The weaveableC field required by this mixin. This field is supposed to reference the Component interface of the component to which this controller object belongs.

Method Detail

lookupFc

public Object lookupFc(String clientItfName)
                throws NoSuchInterfaceException
Checks the interface name with the component's type and then calls the lookupFc method.

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
Checks the interface name with the component's type and then calls the bindFc method. If the server interface implements Interface, and if its type is an instance of InterfaceType, this method also checks the compatibility between the client and server interface types.

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:
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.

unbindFc

public void unbindFc(String clientItfName)
              throws NoSuchInterfaceException,
                     IllegalBindingException,
                     IllegalLifeCycleException
Checks the interface name with the component's type and then calls the unbindFc method.

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.

lookupFc

public Object lookupFc(InterfaceType clientItfType,
                       String clientItfName)
                throws NoSuchInterfaceException
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.

Parameters:
clientItfType - the type of the clientItfName interface.
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(InterfaceType clientItfType,
                   String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
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.

Parameters:
clientItfType - the type of the clientItfName interface.
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.

unbindFc

public void unbindFc(InterfaceType clientItfType,
                     String clientItfName)
              throws NoSuchInterfaceException,
                     IllegalBindingException,
                     IllegalLifeCycleException
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.

Parameters:
clientItfType - the type of the clientItfName interface.
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_lookupFc

public abstract Object _super_lookupFc(String clientItfName)
                                throws NoSuchInterfaceException
The lookupFc method overriden by this mixin.

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.

_super_bindFc

public abstract void _super_bindFc(String clientItfName,
                                   Object serverItf)
                            throws NoSuchInterfaceException,
                                   IllegalBindingException,
                                   IllegalLifeCycleException
The bindFc method overriden by this mixin.

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.

_super_unbindFc

public abstract void _super_unbindFc(String clientItfName)
                              throws NoSuchInterfaceException,
                                     IllegalBindingException,
                                     IllegalLifeCycleException
The unbindFc method overriden by this mixin.

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.