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

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

public abstract class OptimizedCompositeBindingMixin
extends Object
implements BindingController

Provides optimized ComponentInterface management to a BindingController. This mixin uses shortcut links between component interfaces where possible, i.e. when some interfaces do not have associated interceptors.

Requirements


Field Summary
 Component _this_weaveableC
          The weaveableC field required by this mixin.
 ContentController _this_weaveableCC
          The weaveableCC field required by this mixin.
 
Method Summary
abstract  void _super_bindFc(InterfaceType clientItfType, String clientItfName, Object serverItf)
          The bindFc method overriden by this mixin.
abstract  void _super_unbindFc(InterfaceType clientItfType, String clientItfName)
          The unbindFc method overriden by this mixin.
 void bindFc(InterfaceType clientItfType, String clientItfName, Object serverItf)
          Sets the shortcuts for the given binding and then calls the overriden method.
 void setFcClientShortcuts(Interface clientItf, Object impl, Set visited, List shortcutItfs, List shortcutImpls)
          Finds the shortcut links to be updated by following the bindings backwards from the given client interface.
 void setFcServerShortcuts(Interface serverItf, Object impl, Set visited, List shortcutItfs, List shortcutImpls)
          Finds the shortcut links to be updated by followng the bindings backwards from the given server interface.
 void setFcShortcuts(InterfaceType clientItfType, String clientItfName, Object serverItf)
          Creates the given binding and updates the shortcuts links accordingly.
 void unbindFc(InterfaceType clientItfType, String clientItfName)
          Updates the shortcuts for the given binding and then calls the overriden 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
bindFc, listFc, lookupFc, unbindFc
 

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.


_this_weaveableCC

public ContentController _this_weaveableCC
The weaveableCC field required by this mixin. This field is supposed to reference the ContentController interface of the component to which this controller object belongs.

Method Detail

bindFc

public void bindFc(InterfaceType clientItfType,
                   String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
Sets the shortcuts for the given binding and then calls the overriden method.

Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException

unbindFc

public void unbindFc(InterfaceType clientItfType,
                     String clientItfName)
              throws NoSuchInterfaceException,
                     IllegalBindingException,
                     IllegalLifeCycleException
Updates the shortcuts for the given binding and then calls the overriden method.

Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException

setFcShortcuts

public void setFcShortcuts(InterfaceType clientItfType,
                           String clientItfName,
                           Object serverItf)
                    throws NoSuchInterfaceException,
                           IllegalBindingException
Creates the given binding and updates the shortcuts links accordingly.

Parameters:
clientItfName - a client interface name.
serverItf - the server interface to which the client interface must be bound, or null if it must be unbound.
Throws:
IllegalBindingException - if a problem occurs.
NoSuchInterfaceException

setFcClientShortcuts

public void setFcClientShortcuts(Interface clientItf,
                                 Object impl,
                                 Set visited,
                                 List shortcutItfs,
                                 List shortcutImpls)
                          throws Exception
Finds the shortcut links to be updated by following the bindings backwards from the given client interface.

Parameters:
clientItf - the client interface from which the bindings must be followed backward.
impl - the object to be used to update the shortcut links with getFcItfImpl.
visited - the already visited interfaces.
shortcutItfs - TODO.
shortcutImpls - TODO.
Throws:
Exception - if a problem occurs.

setFcServerShortcuts

public void setFcServerShortcuts(Interface serverItf,
                                 Object impl,
                                 Set visited,
                                 List shortcutItfs,
                                 List shortcutImpls)
                          throws Exception
Finds the shortcut links to be updated by followng the bindings backwards from the given server interface.

Parameters:
serverItf - the server interface from which the bindings must be followed backward.
impl - the object to be used to update the shortcut links with getFcItfImpl.
visited - the already visited interfaces.
shortcutItfs - TODO.
shortcutImpls - TODO.
Throws:
Exception - if a problem occurs.

_super_bindFc

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

Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException

_super_unbindFc

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

Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException