org.ow2.jasmine.jade.fractal.julia.factory
Class JadeGenericFactoryMixin

java.lang.Object
  extended by org.ow2.jasmine.jade.fractal.julia.factory.JadeGenericFactoryMixin
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.factory.GenericFactory, org.objectweb.fractal.deployment.local.api.GenericInstallingFactory, DeploymentStateController

public class JadeGenericFactoryMixin
extends java.lang.Object
implements org.objectweb.fractal.deployment.local.api.GenericInstallingFactory, org.objectweb.fractal.api.control.BindingController, DeploymentStateController

Provides a basic implementation of the GenericFactory interface.

Requirements

Contributors : Jakub Kornas, Julien Legrand


Field Summary
 org.objectweb.fractal.api.control.BindingController _this_weaveableBC
          The weaveableBC field required by this mixin.
 org.objectweb.fractal.deployment.local.api.GenericInstallingFactory _this_weaveableGIF
          The weaveableGIF field required by this mixin.
 GenericInstallingFactoryContextController _this_weaveableGIFCC
          The weaveableJCC field required by this mixin.
 org.objectweb.fractal.julia.loader.Loader _this_weaveableL
          The weaveableL field required by this mixin.
 org.objectweb.fractal.api.type.TypeFactory _this_weaveableTF
          The weaveableTF field required by this mixin.
 
Constructor Summary
JadeGenericFactoryMixin()
           
 
Method Summary
 boolean addDeployedComponent(org.objectweb.fractal.api.Component deployedComponent)
          register the deployed component
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 java.util.Set<org.objectweb.fractal.api.Component> getDeployedComponent()
           
 org.objectweb.fractal.julia.loader.Tree getFcContentDescriptor(java.lang.Object contentDesc)
          Returns the tree corresponding to the given content descriptor.
 org.objectweb.fractal.julia.loader.Tree getFcControllerDescriptor(java.lang.Object controllerDesc)
          Returns the tree corresponding to the given controller descriptor.
 java.lang.Object getFcLoader(java.lang.Object loader)
           
 org.objectweb.fractal.deployment.local.api.Loader getFcLoaderForComponent(org.objectweb.fractal.api.Component arg0)
           
 org.objectweb.fractal.julia.loader.Tree getFcTypeDescriptor(org.objectweb.fractal.api.Type type)
          Returns a tree representing the given component type.
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 org.objectweb.fractal.api.Component newFcInstance(org.objectweb.fractal.api.Type type, java.lang.Object controllerDesc, java.lang.Object contentDesc)
           
 org.objectweb.fractal.api.Component newFcInstance(org.objectweb.fractal.api.Type type, java.lang.Object controllerDesc, java.lang.Object contentDesc, org.objectweb.fractal.deployment.local.api.PackageDescription packageDescription)
           
 boolean removeDeployedComponent(org.objectweb.fractal.api.Component deployedComponent)
          unregister the deployed component
 void unbindFc(java.lang.String clientItfName)
           
 void undeployFcComponent(org.objectweb.fractal.api.Component cmp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_this_weaveableL

public org.objectweb.fractal.julia.loader.Loader _this_weaveableL
The weaveableL field required by this mixin. This field is supposed to reference the Loader interface of the component to which this controller object belongs.


_this_weaveableTF

public org.objectweb.fractal.api.type.TypeFactory _this_weaveableTF
The weaveableTF field required by this mixin. This field is supposed to reference the TypeFactory interface of the component to which this controller object belongs.


_this_weaveableBC

public org.objectweb.fractal.api.control.BindingController _this_weaveableBC
The weaveableBC field required by this mixin. This field is supposed to reference the BindingController interface of the component to which this controller object belongs.


_this_weaveableGIF

public org.objectweb.fractal.deployment.local.api.GenericInstallingFactory _this_weaveableGIF
The weaveableGIF field required by this mixin. This field is supposed to reference the GenericInstallingFactory interface of the component to which this controller object belongs.


_this_weaveableGIFCC

public GenericInstallingFactoryContextController _this_weaveableGIFCC
The weaveableJCC field required by this mixin. This field is supposed to reference the GenericInstallingFactoryContextController interface of the component to which this controller object belongs.

Constructor Detail

JadeGenericFactoryMixin

public JadeGenericFactoryMixin()
Method Detail

getFcTypeDescriptor

public org.objectweb.fractal.julia.loader.Tree getFcTypeDescriptor(org.objectweb.fractal.api.Type type)
                                                            throws org.objectweb.fractal.api.factory.InstantiationException
Returns a tree representing the given component type. This tree has the format specified in ContextClassGenerator

Parameters:
type - a component type, must be instance of ComponentType.
Returns:
a tree representing the given component type.
Throws:
org.objectweb.fractal.api.factory.InstantiationException - if the given type is not an instance of ComponentType, or if it contains control interface types.

getFcControllerDescriptor

public org.objectweb.fractal.julia.loader.Tree getFcControllerDescriptor(java.lang.Object controllerDesc)
                                                                  throws org.objectweb.fractal.api.factory.InstantiationException
Returns the tree corresponding to the given controller descriptor. This tree is found by using the _this_weaveableL loader. It must have the format specified in ContextClassGenerator

Parameters:
controllerDesc - a string referencing a true controller descriptor.
Returns:
the tree corresponding to the given controller descriptor.
Throws:
org.objectweb.fractal.api.factory.InstantiationException - if the tree cannot be loaded.

getFcContentDescriptor

public org.objectweb.fractal.julia.loader.Tree getFcContentDescriptor(java.lang.Object contentDesc)
Returns the tree corresponding to the given content descriptor. This tree has the format specified in ContextClassGenerator

Parameters:
contentDesc - a content descriptor.
Returns:
the tree corresponding to the given content descriptor.

newFcInstance

public org.objectweb.fractal.api.Component newFcInstance(org.objectweb.fractal.api.Type type,
                                                         java.lang.Object controllerDesc,
                                                         java.lang.Object contentDesc)
                                                  throws org.objectweb.fractal.api.factory.InstantiationException
Specified by:
newFcInstance in interface org.objectweb.fractal.api.factory.GenericFactory
Throws:
org.objectweb.fractal.api.factory.InstantiationException

getFcLoader

public java.lang.Object getFcLoader(java.lang.Object loader)
Parameters:
loader -
Returns:

newFcInstance

public org.objectweb.fractal.api.Component newFcInstance(org.objectweb.fractal.api.Type type,
                                                         java.lang.Object controllerDesc,
                                                         java.lang.Object contentDesc,
                                                         org.objectweb.fractal.deployment.local.api.PackageDescription packageDescription)
                                                  throws org.objectweb.fractal.api.factory.InstantiationException
Specified by:
newFcInstance in interface org.objectweb.fractal.deployment.local.api.GenericInstallingFactory
Throws:
org.objectweb.fractal.api.factory.InstantiationException

undeployFcComponent

public void undeployFcComponent(org.objectweb.fractal.api.Component cmp)
Specified by:
undeployFcComponent in interface org.objectweb.fractal.deployment.local.api.GenericInstallingFactory

getFcLoaderForComponent

public org.objectweb.fractal.deployment.local.api.Loader getFcLoaderForComponent(org.objectweb.fractal.api.Component arg0)
Specified by:
getFcLoaderForComponent in interface org.objectweb.fractal.deployment.local.api.GenericInstallingFactory

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
            throws org.objectweb.fractal.api.NoSuchInterfaceException,
                   org.objectweb.fractal.api.control.IllegalBindingException,
                   org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
                          throws org.objectweb.fractal.api.NoSuchInterfaceException
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException

unbindFc

public void unbindFc(java.lang.String clientItfName)
              throws org.objectweb.fractal.api.NoSuchInterfaceException,
                     org.objectweb.fractal.api.control.IllegalBindingException,
                     org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

addDeployedComponent

public boolean addDeployedComponent(org.objectweb.fractal.api.Component deployedComponent)
Description copied from interface: DeploymentStateController
register the deployed component

Specified by:
addDeployedComponent in interface DeploymentStateController
Parameters:
deployedComponent - The component to register
Returns:
true if the component has been added, false otherwise

removeDeployedComponent

public boolean removeDeployedComponent(org.objectweb.fractal.api.Component deployedComponent)
Description copied from interface: DeploymentStateController
unregister the deployed component

Specified by:
removeDeployedComponent in interface DeploymentStateController
Parameters:
deployedComponent - The component to register
Returns:
true if the component has been removed, false otherwise

getDeployedComponent

public java.util.Set<org.objectweb.fractal.api.Component> getDeployedComponent()
Specified by:
getDeployedComponent in interface DeploymentStateController
Returns:
a set of deployed components registered, null if there's no deployed component


Copyright © 2008 OW2 Consortium. All Rights Reserved.