Mail Archive Home | fractal-commits List | October 2006 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Tuesday, October 24, 2006 @ 12:56:20
Author: seintur
Path: /cvsroot/fractal/julia
Added: archive/juliak.mf archive/juliak.xml config/juliak/dtdparser.jar
config/juliak/fractal-adl.jar
config/juliak/ow_deployment_scheduling.jar
config/juliak/spoon-1.0.jar examples/membrane/README.txt
examples/membrane/build.xml
examples/membrane/etc/execute.properties
examples/membrane/etc/julia.cfg
examples/membrane/lib/dtdparser.jar
examples/membrane/lib/fractal-adl.jar
examples/membrane/lib/ow_deployment_scheduling.jar
examples/membrane/src/membrane/Main.java
examples/membrane/src/membrane/glue/BasicLoggerControllerImpl.java
examples/membrane/src/membrane/glue/C.java
examples/membrane/src/membrane/glue/Loggable.java
examples/membrane/src/membrane/glue/LoggablePrimitive.fractal
examples/membrane/src/membrane/glue/LoggerController.fractal
examples/membrane/src/membrane/glue/LoggerController.java
examples/membrane/src/membrane/glue/LoggerControllerRegister.java
examples/membrane/src/membrane/glue/LoggerControllerType.fractal
examples/membrane/src/membrane/glue/Main.java
examples/membrane/src/membrane/glue/Util.java
examples/membrane/src/membrane/interceptor/C.java
examples/membrane/src/membrane/interceptor/Main.java
examples/membrane/src/membrane/introspect/Main.java
src/org/objectweb/fractal/juliak/BootstrapComponentImpl.java
src/org/objectweb/fractal/juliak/FractalHelper.java
src/org/objectweb/fractal/juliak/Juliak.java
src/org/objectweb/fractal/juliak/asm/AllMethodsVisitor.java
src/org/objectweb/fractal/juliak/asm/ISignatureParameter.java
src/org/objectweb/fractal/juliak/asm/InterfaceAllMethodsVisitor.java
src/org/objectweb/fractal/juliak/asm/InterfaceClassGenerator.java
src/org/objectweb/fractal/juliak/asm/InvalidSignatureException.java
src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorAllMethodsVisitor.java
src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorClassGenerator.java
src/org/objectweb/fractal/juliak/asm/MergedPrimitiveLifeCycleInterceptorClassGenerator.java
src/org/objectweb/fractal/juliak/asm/SPDouble.java
src/org/objectweb/fractal/juliak/asm/SPFloat.java
src/org/objectweb/fractal/juliak/asm/SPInt.java
src/org/objectweb/fractal/juliak/asm/SPLong.java
src/org/objectweb/fractal/juliak/asm/SPObject.java
src/org/objectweb/fractal/juliak/asm/SPVoid.java
src/org/objectweb/fractal/juliak/asm/SignatureStringAnalyzer.java
src/org/objectweb/fractal/juliak/asm/package.html
src/org/objectweb/fractal/juliak/control/attribute/AttributeController.fractal
src/org/objectweb/fractal/juliak/control/attribute/AttributeControllerDef.java
src/org/objectweb/fractal/juliak/control/attribute/AttributeControllerImpl.java
src/org/objectweb/fractal/juliak/control/attribute/AttributeControllerType.fractal
src/org/objectweb/fractal/juliak/control/attribute/UseAttributeControllerType.fractal
src/org/objectweb/fractal/juliak/control/attribute/package.html
src/org/objectweb/fractal/juliak/control/binding/BindingControllerDef.java
src/org/objectweb/fractal/juliak/control/binding/BindingControllerType.fractal
src/org/objectweb/fractal/juliak/control/binding/CompositeAutoBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/CompositeBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/CompositeTemplateBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/ContainerAutoBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/ContainerBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/FlatContainerBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/FlatPrimitiveBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/PrimitiveBindingController.fractal
src/org/objectweb/fractal/juliak/control/binding/UseBindingControllerType.fractal
src/org/objectweb/fractal/juliak/control/binding/package.html
src/org/objectweb/fractal/juliak/control/component/ComponentController.fractal
src/org/objectweb/fractal/juliak/control/component/ComponentControllerDef.java
src/org/objectweb/fractal/juliak/control/component/ComponentControllerType.fractal
src/org/objectweb/fractal/juliak/control/component/UseComponentControllerType.fractal
src/org/objectweb/fractal/juliak/control/component/package.html
src/org/objectweb/fractal/juliak/control/content/CompositeContentController.fractal
src/org/objectweb/fractal/juliak/control/content/ContentController.fractal
src/org/objectweb/fractal/juliak/control/content/ContentControllerDef.java
src/org/objectweb/fractal/juliak/control/content/ContentControllerType.fractal
src/org/objectweb/fractal/juliak/control/content/UseContentControllerType.fractal
src/org/objectweb/fractal/juliak/control/content/package.html
src/org/objectweb/fractal/juliak/control/factory/FactoryController.fractal
src/org/objectweb/fractal/juliak/control/factory/FactoryControllerType.fractal
src/org/objectweb/fractal/juliak/control/factory/FactoryDef.java
src/org/objectweb/fractal/juliak/control/factory/package.html
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorController.fractal
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorController.java
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorControllerMixin.java
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorControllerType.fractal
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorDefAttributes.java
src/org/objectweb/fractal/juliak/control/interceptor/package.html
src/org/objectweb/fractal/juliak/control/lifecycle/AbstractLifeCycleInterceptor.java
src/org/objectweb/fractal/juliak/control/lifecycle/CompositeLifeCycleController.fractal
src/org/objectweb/fractal/juliak/control/lifecycle/CompositeLifeCycleControllerType.fractal
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleController.fractal
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleControllerDef.java
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleControllerType.fractal
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleInterceptor.fractal
src/org/objectweb/fractal/juliak/control/lifecycle/UseLifeCycleControllerType.fractal
src/org/objectweb/fractal/juliak/control/lifecycle/package.html
src/org/objectweb/fractal/juliak/control/membrane/MembraneController.fractal
src/org/objectweb/fractal/juliak/control/membrane/MembraneController.java
src/org/objectweb/fractal/juliak/control/membrane/MembraneControllerImpl.java
src/org/objectweb/fractal/juliak/control/membrane/MembraneControllerType.fractal
src/org/objectweb/fractal/juliak/control/membrane/package.html
src/org/objectweb/fractal/juliak/control/name/NameController.fractal
src/org/objectweb/fractal/juliak/control/name/NameControllerDef.java
src/org/objectweb/fractal/juliak/control/name/NameControllerType.fractal
src/org/objectweb/fractal/juliak/control/name/UseNameControllerType.fractal
src/org/objectweb/fractal/juliak/control/name/package.html
src/org/objectweb/fractal/juliak/control/superc/SuperController.fractal
src/org/objectweb/fractal/juliak/control/superc/SuperControllerDef.java
src/org/objectweb/fractal/juliak/control/superc/SuperControllerType.fractal
src/org/objectweb/fractal/juliak/control/superc/UseSuperControllerType.fractal
src/org/objectweb/fractal/juliak/control/superc/package.html
src/org/objectweb/fractal/juliak/factory/AbstractMap.java
src/org/objectweb/fractal/juliak/factory/ClassDefinition.java
src/org/objectweb/fractal/juliak/factory/ControlComponentBoundMap.java
src/org/objectweb/fractal/juliak/factory/FcItfImplHelper.java
src/org/objectweb/fractal/juliak/factory/GenericFactoryImpl.java
src/org/objectweb/fractal/juliak/factory/InstanceGenerator.java
src/org/objectweb/fractal/juliak/factory/InterfaceInstanceGenerator.java
src/org/objectweb/fractal/juliak/factory/JuliakGenerated.java
src/org/objectweb/fractal/juliak/factory/ProxyClassGenerator.java
src/org/objectweb/fractal/juliak/factory/ProxyClassMode.java
src/org/objectweb/fractal/juliak/factory/TypeFactoryImpl.java
src/org/objectweb/fractal/juliak/factory/package.html
src/org/objectweb/fractal/juliak/membrane/AutoBindingComposite.fractal
src/org/objectweb/fractal/juliak/membrane/AutoBindingPrimitive.fractal
src/org/objectweb/fractal/juliak/membrane/BasicMembranes.java
src/org/objectweb/fractal/juliak/membrane/Bootstrap.fractal
src/org/objectweb/fractal/juliak/membrane/Composite.fractal
src/org/objectweb/fractal/juliak/membrane/CompositeTemplate.fractal
src/org/objectweb/fractal/juliak/membrane/CompositeType.fractal
src/org/objectweb/fractal/juliak/membrane/ControllerDef.java
src/org/objectweb/fractal/juliak/membrane/FlatParametricPrimitive.fractal
src/org/objectweb/fractal/juliak/membrane/FlatParametricPrimitiveTemplate.fractal
src/org/objectweb/fractal/juliak/membrane/FlatPrimitive.fractal
src/org/objectweb/fractal/juliak/membrane/FlatPrimitiveTemplate.fractal
src/org/objectweb/fractal/juliak/membrane/JuliakMembranes.java
src/org/objectweb/fractal/juliak/membrane/MCompositeImpl.java
src/org/objectweb/fractal/juliak/membrane/MPrimitiveImpl.java
src/org/objectweb/fractal/juliak/membrane/MembraneDef.java
src/org/objectweb/fractal/juliak/membrane/Membranes.java
src/org/objectweb/fractal/juliak/membrane/MergedComposite.fractal
src/org/objectweb/fractal/juliak/membrane/MergedPrimitive.fractal
src/org/objectweb/fractal/juliak/membrane/ParametricComposite.fractal
src/org/objectweb/fractal/juliak/membrane/ParametricCompositeTemplate.fractal
src/org/objectweb/fractal/juliak/membrane/ParametricPrimitive.fractal
src/org/objectweb/fractal/juliak/membrane/ParametricPrimitiveTemplate.fractal
src/org/objectweb/fractal/juliak/membrane/Primitive.fractal
src/org/objectweb/fractal/juliak/membrane/PrimitiveTemplate.fractal
src/org/objectweb/fractal/juliak/membrane/PrimitiveType.fractal
src/org/objectweb/fractal/juliak/membrane/Root.fractal
src/org/objectweb/fractal/juliak/membrane/StaticMembraneFactory.java
src/org/objectweb/fractal/juliak/membrane/backend/BackendDef.java
src/org/objectweb/fractal/juliak/membrane/backend/BasicControllerMixin.java
src/org/objectweb/fractal/juliak/membrane/backend/MembraneCompiler.java
src/org/objectweb/fractal/juliak/membrane/backend/StaticBackend.fractal
src/org/objectweb/fractal/juliak/membrane/backend/StaticComponentBuilder.java
src/org/objectweb/fractal/juliak/membrane/backend/package.html
src/org/objectweb/fractal/juliak/membrane/package.html
src/org/objectweb/fractal/juliak/package.html
src/org/objectweb/fractal/juliak/platform/Platform.java
src/org/objectweb/fractal/juliak/platform/PlatformItf.java
src/org/objectweb/fractal/juliak/platform/PlatformJMECLDC.java
src/org/objectweb/fractal/juliak/platform/PlatformJSE.java
src/org/objectweb/fractal/juliak/platform/package.html
src/org/objectweb/fractal/juliak/spoon/AOKellMixinLayers.java
src/org/objectweb/fractal/juliak/spoon/BasicMixinLayers.java
src/org/objectweb/fractal/juliak/spoon/KeepGeneratedProcessor.java
src/org/objectweb/fractal/juliak/spoon/MixinLayersDef.java
src/org/objectweb/fractal/juliak/spoon/SpoonMixinClassProcessor.java
src/org/objectweb/fractal/juliak/spoon/package.html
test/perf/perf8.xml
Modified: archive/julia-asm.mf archive/julia-mixins.mf
archive/julia-runtime-j2me.mf archive/julia-runtime.mf
build.properties build.xml examples/common/etc/build.properties
test/conform/conf.xml
New feature: component-based control membranes.
---------------------------------------------------------------------------------------------+
archive/julia-asm.mf
| 2
archive/julia-mixins.mf
| 2
archive/julia-runtime-j2me.mf
| 2
archive/julia-runtime.mf
| 2
archive/juliak.mf
| 4
archive/juliak.xml
| 10
build.properties
| 2
build.xml
| 160 +
config/juliak/dtdparser.jar
| <<Binary file>>
config/juliak/fractal-adl.jar
| <<Binary file>>
config/juliak/ow_deployment_scheduling.jar
| <<Binary file>>
config/juliak/spoon-1.0.jar
| <<Binary file>>
examples/common/etc/build.properties
| 6
examples/membrane/README.txt
| 9
examples/membrane/build.xml
| 83
examples/membrane/etc/execute.properties
| 12
examples/membrane/etc/julia.cfg
| 613 +++++++
examples/membrane/lib/dtdparser.jar
| <<Binary file>>
examples/membrane/lib/fractal-adl.jar
| <<Binary file>>
examples/membrane/lib/ow_deployment_scheduling.jar
| <<Binary file>>
examples/membrane/src/membrane/Main.java
| 55
examples/membrane/src/membrane/glue/BasicLoggerControllerImpl.java
| 258 +++
examples/membrane/src/membrane/glue/C.java
| 47
examples/membrane/src/membrane/glue/Loggable.java
| 44
examples/membrane/src/membrane/glue/LoggablePrimitive.fractal
| 36
examples/membrane/src/membrane/glue/LoggerController.fractal
| 34
examples/membrane/src/membrane/glue/LoggerController.java
| 93 +
examples/membrane/src/membrane/glue/LoggerControllerRegister.java
| 51
examples/membrane/src/membrane/glue/LoggerControllerType.fractal
| 39
examples/membrane/src/membrane/glue/Main.java
| 99 +
examples/membrane/src/membrane/glue/Util.java
| 48
examples/membrane/src/membrane/interceptor/C.java
| 37
examples/membrane/src/membrane/interceptor/Main.java
| 127 +
examples/membrane/src/membrane/introspect/Main.java
| 101 +
src/org/objectweb/fractal/juliak/BootstrapComponentImpl.java
| 89 +
src/org/objectweb/fractal/juliak/FractalHelper.java
| 346 ++++
src/org/objectweb/fractal/juliak/Juliak.java
| 124 +
src/org/objectweb/fractal/juliak/asm/AllMethodsVisitor.java
| 150 +
src/org/objectweb/fractal/juliak/asm/ISignatureParameter.java
| 43
src/org/objectweb/fractal/juliak/asm/InterfaceAllMethodsVisitor.java
| 187 ++
src/org/objectweb/fractal/juliak/asm/InterfaceClassGenerator.java
| 268 +++
src/org/objectweb/fractal/juliak/asm/InvalidSignatureException.java
| 52
src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorAllMethodsVisitor.java
| 317 +++
src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorClassGenerator.java
| 278 +++
src/org/objectweb/fractal/juliak/asm/MergedPrimitiveLifeCycleInterceptorClassGenerator.java
| 49
src/org/objectweb/fractal/juliak/asm/SPDouble.java
| 57
src/org/objectweb/fractal/juliak/asm/SPFloat.java
| 57
src/org/objectweb/fractal/juliak/asm/SPInt.java
| 57
src/org/objectweb/fractal/juliak/asm/SPLong.java
| 57
src/org/objectweb/fractal/juliak/asm/SPObject.java
| 57
src/org/objectweb/fractal/juliak/asm/SPVoid.java
| 57
src/org/objectweb/fractal/juliak/asm/SignatureStringAnalyzer.java
| 131 +
src/org/objectweb/fractal/juliak/asm/package.html
| 34
src/org/objectweb/fractal/juliak/control/attribute/AttributeController.fractal
| 34
src/org/objectweb/fractal/juliak/control/attribute/AttributeControllerDef.java
| 46
src/org/objectweb/fractal/juliak/control/attribute/AttributeControllerImpl.java
| 88 +
src/org/objectweb/fractal/juliak/control/attribute/AttributeControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/attribute/UseAttributeControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/attribute/package.html
| 33
src/org/objectweb/fractal/juliak/control/binding/BindingControllerDef.java
| 46
src/org/objectweb/fractal/juliak/control/binding/BindingControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/binding/CompositeAutoBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/CompositeBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/CompositeTemplateBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/ContainerAutoBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/ContainerBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/FlatContainerBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/FlatPrimitiveBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/PrimitiveBindingController.fractal
| 34
src/org/objectweb/fractal/juliak/control/binding/UseBindingControllerType.fractal
| 35
src/org/objectweb/fractal/juliak/control/binding/package.html
| 35
src/org/objectweb/fractal/juliak/control/component/ComponentController.fractal
| 34
src/org/objectweb/fractal/juliak/control/component/ComponentControllerDef.java
| 46
src/org/objectweb/fractal/juliak/control/component/ComponentControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/component/UseComponentControllerType.fractal
| 35
src/org/objectweb/fractal/juliak/control/component/package.html
| 35
src/org/objectweb/fractal/juliak/control/content/CompositeContentController.fractal
| 34
src/org/objectweb/fractal/juliak/control/content/ContentController.fractal
| 34
src/org/objectweb/fractal/juliak/control/content/ContentControllerDef.java
| 45
src/org/objectweb/fractal/juliak/control/content/ContentControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/content/UseContentControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/content/package.html
| 35
src/org/objectweb/fractal/juliak/control/factory/FactoryController.fractal
| 48
src/org/objectweb/fractal/juliak/control/factory/FactoryControllerType.fractal
| 39
src/org/objectweb/fractal/juliak/control/factory/FactoryDef.java
| 60
src/org/objectweb/fractal/juliak/control/factory/package.html
| 35
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorController.fractal
| 35
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorController.java
| 64
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorControllerMixin.java
| 298 +++
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorControllerType.fractal
| 36
src/org/objectweb/fractal/juliak/control/interceptor/InterceptorDefAttributes.java
| 53
src/org/objectweb/fractal/juliak/control/interceptor/package.html
| 33
src/org/objectweb/fractal/juliak/control/lifecycle/AbstractLifeCycleInterceptor.java
| 106 +
src/org/objectweb/fractal/juliak/control/lifecycle/CompositeLifeCycleController.fractal
| 34
src/org/objectweb/fractal/juliak/control/lifecycle/CompositeLifeCycleControllerType.fractal
| 36
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleController.fractal
| 34
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleControllerDef.java
| 51
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleControllerType.fractal
| 36
src/org/objectweb/fractal/juliak/control/lifecycle/LifeCycleInterceptor.fractal
| 38
src/org/objectweb/fractal/juliak/control/lifecycle/UseLifeCycleControllerType.fractal
| 36
src/org/objectweb/fractal/juliak/control/lifecycle/package.html
| 35
src/org/objectweb/fractal/juliak/control/membrane/MembraneController.fractal
| 34
src/org/objectweb/fractal/juliak/control/membrane/MembraneController.java
| 53
src/org/objectweb/fractal/juliak/control/membrane/MembraneControllerImpl.java
| 65
src/org/objectweb/fractal/juliak/control/membrane/MembraneControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/membrane/package.html
| 33
src/org/objectweb/fractal/juliak/control/name/NameController.fractal
| 34
src/org/objectweb/fractal/juliak/control/name/NameControllerDef.java
| 46
src/org/objectweb/fractal/juliak/control/name/NameControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/name/UseNameControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/name/package.html
| 35
src/org/objectweb/fractal/juliak/control/superc/SuperController.fractal
| 34
src/org/objectweb/fractal/juliak/control/superc/SuperControllerDef.java
| 45
src/org/objectweb/fractal/juliak/control/superc/SuperControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/superc/UseSuperControllerType.fractal
| 33
src/org/objectweb/fractal/juliak/control/superc/package.html
| 35
src/org/objectweb/fractal/juliak/factory/AbstractMap.java
| 91 +
src/org/objectweb/fractal/juliak/factory/ClassDefinition.java
| 47
src/org/objectweb/fractal/juliak/factory/ControlComponentBoundMap.java
| 138 +
src/org/objectweb/fractal/juliak/factory/FcItfImplHelper.java
| 82
src/org/objectweb/fractal/juliak/factory/GenericFactoryImpl.java
| 831 ++++++++++
src/org/objectweb/fractal/juliak/factory/InstanceGenerator.java
| 84 +
src/org/objectweb/fractal/juliak/factory/InterfaceInstanceGenerator.java
| 116 +
src/org/objectweb/fractal/juliak/factory/JuliakGenerated.java
| 33
src/org/objectweb/fractal/juliak/factory/ProxyClassGenerator.java
| 217 ++
src/org/objectweb/fractal/juliak/factory/ProxyClassMode.java
| 37
src/org/objectweb/fractal/juliak/factory/TypeFactoryImpl.java
| 161 +
src/org/objectweb/fractal/juliak/factory/package.html
| 33
src/org/objectweb/fractal/juliak/membrane/AutoBindingComposite.fractal
| 65
src/org/objectweb/fractal/juliak/membrane/AutoBindingPrimitive.fractal
| 64
src/org/objectweb/fractal/juliak/membrane/BasicMembranes.java
| 140 +
src/org/objectweb/fractal/juliak/membrane/Bootstrap.fractal
| 38
src/org/objectweb/fractal/juliak/membrane/Composite.fractal
| 66
src/org/objectweb/fractal/juliak/membrane/CompositeTemplate.fractal
| 66
src/org/objectweb/fractal/juliak/membrane/CompositeType.fractal
| 31
src/org/objectweb/fractal/juliak/membrane/ControllerDef.java
| 66
src/org/objectweb/fractal/juliak/membrane/FlatParametricPrimitive.fractal
| 31
src/org/objectweb/fractal/juliak/membrane/FlatParametricPrimitiveTemplate.fractal
| 31
src/org/objectweb/fractal/juliak/membrane/FlatPrimitive.fractal
| 59
src/org/objectweb/fractal/juliak/membrane/FlatPrimitiveTemplate.fractal
| 55
src/org/objectweb/fractal/juliak/membrane/JuliakMembranes.java
| 40
src/org/objectweb/fractal/juliak/membrane/MCompositeImpl.java
| 93 +
src/org/objectweb/fractal/juliak/membrane/MPrimitiveImpl.java
| 247 ++
src/org/objectweb/fractal/juliak/membrane/MembraneDef.java
| 87 +
src/org/objectweb/fractal/juliak/membrane/Membranes.java
| 114 +
src/org/objectweb/fractal/juliak/membrane/MergedComposite.fractal
| 35
src/org/objectweb/fractal/juliak/membrane/MergedPrimitive.fractal
| 42
src/org/objectweb/fractal/juliak/membrane/ParametricComposite.fractal
| 31
src/org/objectweb/fractal/juliak/membrane/ParametricCompositeTemplate.fractal
| 71
src/org/objectweb/fractal/juliak/membrane/ParametricPrimitive.fractal
| 31
src/org/objectweb/fractal/juliak/membrane/ParametricPrimitiveTemplate.fractal
| 70
src/org/objectweb/fractal/juliak/membrane/Primitive.fractal
| 64
src/org/objectweb/fractal/juliak/membrane/PrimitiveTemplate.fractal
| 60
src/org/objectweb/fractal/juliak/membrane/PrimitiveType.fractal
| 31
src/org/objectweb/fractal/juliak/membrane/Root.fractal
| 36
src/org/objectweb/fractal/juliak/membrane/StaticMembraneFactory.java
| 42
src/org/objectweb/fractal/juliak/membrane/backend/BackendDef.java
| 47
src/org/objectweb/fractal/juliak/membrane/backend/BasicControllerMixin.java
| 41
src/org/objectweb/fractal/juliak/membrane/backend/MembraneCompiler.java
| 191 ++
src/org/objectweb/fractal/juliak/membrane/backend/StaticBackend.fractal
| 35
src/org/objectweb/fractal/juliak/membrane/backend/StaticComponentBuilder.java
| 46
src/org/objectweb/fractal/juliak/membrane/backend/package.html
| 33
src/org/objectweb/fractal/juliak/membrane/package.html
| 32
src/org/objectweb/fractal/juliak/package.html
| 33
src/org/objectweb/fractal/juliak/platform/Platform.java
| 70
src/org/objectweb/fractal/juliak/platform/PlatformItf.java
| 66
src/org/objectweb/fractal/juliak/platform/PlatformJMECLDC.java
| 97 +
src/org/objectweb/fractal/juliak/platform/PlatformJSE.java
| 168 ++
src/org/objectweb/fractal/juliak/platform/package.html
| 33
src/org/objectweb/fractal/juliak/spoon/AOKellMixinLayers.java
| 39
src/org/objectweb/fractal/juliak/spoon/BasicMixinLayers.java
| 443 +++++
src/org/objectweb/fractal/juliak/spoon/KeepGeneratedProcessor.java
| 72
src/org/objectweb/fractal/juliak/spoon/MixinLayersDef.java
| 54
src/org/objectweb/fractal/juliak/spoon/SpoonMixinClassProcessor.java
| 705 ++++++++
src/org/objectweb/fractal/juliak/spoon/package.html
| 32
test/conform/conf.xml
| 22
test/perf/perf8.xml
| 24
177 files changed, 13072 insertions(+), 51 deletions(-)
Index: julia/archive/julia-asm.mf
diff -u julia/archive/julia-asm.mf:1.6 julia/archive/julia-asm.mf:1.7
--- julia/archive/julia-asm.mf:1.6 Mon Feb 6 17:46:14 2006
+++ julia/archive/julia-asm.mf Tue Oct 24 12:56:18 2006
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
Implementation-Title: "Julia class generators"
-Implementation-Version: "2.1.4"
+Implementation-Version: "2.5"
Implementation-Vendor: "France Telecom R&D"
Index: julia/archive/julia-mixins.mf
diff -u julia/archive/julia-mixins.mf:1.6 julia/archive/julia-mixins.mf:1.7
--- julia/archive/julia-mixins.mf:1.6 Mon Feb 6 17:46:14 2006
+++ julia/archive/julia-mixins.mf Tue Oct 24 12:56:18 2006
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
Implementation-Title: "Julia mixins"
-Implementation-Version: "2.1.4"
+Implementation-Version: "2.5"
Implementation-Vendor: "France Telecom R&D"
Index: julia/archive/julia-runtime-j2me.mf
diff -u julia/archive/julia-runtime-j2me.mf:1.6
julia/archive/julia-runtime-j2me.mf:1.7
--- julia/archive/julia-runtime-j2me.mf:1.6 Mon Feb 6 17:46:14 2006
+++ julia/archive/julia-runtime-j2me.mf Tue Oct 24 12:56:18 2006
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
Implementation-Title: "Julia runtime for J2ME"
-Implementation-Version: "2.1.4"
+Implementation-Version: "2.5"
Implementation-Vendor: "France Telecom R&D"
Index: julia/archive/julia-runtime.mf
diff -u julia/archive/julia-runtime.mf:1.6 julia/archive/julia-runtime.mf:1.7
--- julia/archive/julia-runtime.mf:1.6 Mon Feb 6 17:46:14 2006
+++ julia/archive/julia-runtime.mf Tue Oct 24 12:56:18 2006
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
Implementation-Title: "Julia runtime"
-Implementation-Version: "2.1.4"
+Implementation-Version: "2.5"
Implementation-Vendor: "France Telecom R&D"
Index: julia/archive/juliak.mf
diff -u /dev/null julia/archive/juliak.mf:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/archive/juliak.mf Tue Oct 24 12:56:18 2006
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Implementation-Title: "Juliak"
+Implementation-Version: "2.5"
+Implementation-Vendor: "INRIA, France Telecom, USTL"
Index: julia/archive/juliak.xml
diff -u /dev/null julia/archive/juliak.xml:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/archive/juliak.xml Tue Oct 24 12:56:18 2006
@@ -0,0 +1,10 @@
+<project name="juliak" default="dist">
+ <target name="dist">
+ <jar jarfile="${out.dist.lib}/juliak.jar"
manifest="${archive}/juliak.mf">
+ <fileset dir="${out.build}">
+ <include name="org/objectweb/fractal/juliak/**/*.class"/>
+ <include name="org/objectweb/fractal/juliak/**/*.fractal"/>
+ </fileset>
+ </jar>
+ </target>
+</project>
Index: julia/build.properties
diff -u julia/build.properties:1.11 julia/build.properties:1.12
--- julia/build.properties:1.11 Wed Sep 6 21:15:06 2006
+++ julia/build.properties Tue Oct 24 12:56:18 2006
@@ -17,7 +17,7 @@
# Some information about the product
product.name julia
-product.version 2.1.5
+product.version 2.5
###############################################################################
# BUILD
Index: julia/build.xml
diff -u julia/build.xml:1.10 julia/build.xml:1.11
--- julia/build.xml:1.10 Fri Sep 15 13:06:32 2006
+++ julia/build.xml Tue Oct 24 12:56:18 2006
@@ -29,11 +29,11 @@
<property name="test" value="${basedir}/test"/>
<property name="doc" value="${basedir}/doc"/>
<property name="jdoc" value="${basedir}/jdoc"/>
- <property name="web" value="${basedir}/web"/>
<property name="examples" value="${basedir}/examples"/>
<property name="examples.common" value="${examples}/common"/>
<property name="config" value="${basedir}/config"/>
<property name="archive" value="${basedir}/archive"/>
+ <property name="externals" value="${basedir}/externals"/>
<property name="out" value="${basedir}/output"/>
<property name="out.build" value="${out}/build"/>
@@ -43,6 +43,7 @@
<property name="out.dist.jdoc" value="${out.dist.doc}/javadoc"/>
<property name="out.dist.examples" value="${out.dist}/examples"/>
<property name="out.dist.externals" value="${out.dist}/externals"/>
+ <property name="out.generated" value="${out}/generated"/>
<property name="out.test" value="${out}/test"/>
<property name="out.zip" value="${out}/zip"/>
@@ -51,10 +52,6 @@
<available file="${examples}"/>
</condition>
- <condition property="web.exist">
- <available file="${web}/build.xml"/>
- </condition>
-
<condition property="paths.configured">
<and>
<isset property="objectweb.ant.tasks.path"/>
@@ -94,19 +91,25 @@
<pathelement path="${fractal.path}"/>
<pathelement path="${monolog.path}"/>
</path>
+
+ <path id="fullclasspath">
+ <pathelement location="${out.build}"/>
+ <fileset dir="${config}" includes="**/*.jar" />
+ <fileset dir="${externals}" includes="**/*.jar" />
+ </path>
</target>
<!-- =================================== -->
<!-- ========== COMPILE ========== -->
<!-- =================================== -->
- <target name="compile" depends="init">
+ <target name="compile" depends="init" description="Compiles Julia">
<mkdir dir="${out.build}"/>
<mkdir dir="${out.build}/j2me"/>
<javac destdir="${out.build}" debug="on" source="1.3" target="1.3">
<classpath refid="classpath"/>
<src path="${src}"/>
- <include name="**/*.java"/>
+ <include name="org/objectweb/fractal/julia/**/*.java"/>
</javac>
<taskdef name="j2mec"
classname="org.objectweb.fractal.julia.ant.J2MEConverter">
@@ -119,13 +122,83 @@
<exclude name="org/objectweb/fractal/julia/factory/Check*.class"/>
<exclude name="org/objectweb/fractal/julia/loader/Dynamic*.class"/>
</j2mec>
+ <available classname="java.util.Scanner" property="java5" />
+ <antcall target="check.compile-juliak" />
+ <antcall target="compile-juliak" />
</target>
-
+
+ <!-- =================================== -->
+ <!-- ====== COMPILE JULIAK ======= -->
+ <!-- =================================== -->
+
+ <target name="check.compile-juliak" unless="java5">
+ <echo message="A Java 5 compatible compiler is needed to compile
Juliak." />
+ <echo message="Juliak manages component-based control membrane." />
+ <echo message="You can still use Julia without Juliak." />
+ </target>
+
+ <target name="compile-juliak" if="java5">
+ <!-- Compile Juliak source code -->
+ <mkdir dir="${out.build}" />
+ <javac destdir="${out.build}">
+ <src path="${src}"/>
+ <include name="org/objectweb/fractal/juliak/**/*.java"/>
+ <classpath refid="fullclasspath" />
+ </javac>
+ <!-- Check whether spoon must be run -->
+ <uptodate
+ property="compile-juliak.spoon.notrequired"
+
targetfile="${out.generated}/org/objectweb/fractal/juliak/ComponentImpl.java">
+ <srcfiles dir="${src}" includes="**/*.java" />
+ </uptodate>
+ <antcall target="compile-juliak.spoon" />
+ <!-- Check whether membranes must be compiled -->
+ <uptodate
+ property="compile-juliak.membrane.notrequired"
+
targetfile="${out.build}/org/objectweb/fractal/juliak/membrane/Bootstrap.class">
+ <srcfiles dir="${src}" includes="**/*.fractal" />
+ </uptodate>
+ <antcall target="compile-juliak.membrane" />
+ </target>
+
+ <!-- Control membranes compilation -->
+ <target name="compile-juliak.membrane"
unless="compile-juliak.membrane.notrequired">
+ <mkdir dir="${out.build}" />
+ <copy todir="${out.build}">
+ <fileset dir="${src}"
includes="org/objectweb/fractal/juliak/**/*.fractal" />
+ </copy>
+ <!-- Generate the Java code associated to control membranes -->
+ <mkdir dir="${out.generated}" />
+ <java
classname="org.objectweb.fractal.juliak.membrane.backend.MembraneCompiler"
+ classpathref="fullclasspath" fork="yes">
+ <arg value="-d" />
+ <arg value="${out.generated}" />
+ </java>
+ <!-- Compile the generated code -->
+ <javac destdir="${out.build}">
+ <src path="${out.generated}" />
+ <include name="org/objectweb/fractal/juliak/membrane/**" />
+ <classpath refid="fullclasspath" />
+ </javac>
+ </target>
+
+ <!-- Mix and compile mixin layers -->
+ <target name="compile-juliak.spoon"
unless="compile-juliak.spoon.notrequired">
+ <mkdir dir="${out.generated}"/>
+ <taskdef name="spoon" classname="spoon.SpoonTask"
classpathref="fullclasspath" />
+ <spoon output="${out.generated}" classpathref="fullclasspath"
+ build="${out.build}" compile="true" >
+ <sourceSet dir="${src}" includes="**/*.java"
excludes="org/objectweb/fractal/julia/ant/*.java" />
+ <processor
type="org.objectweb.fractal.juliak.spoon.SpoonMixinClassProcessor" />
+ <processor
type="org.objectweb.fractal.juliak.spoon.KeepGeneratedProcessor" />
+ </spoon>
+ </target>
+
<!-- =================================== -->
<!-- ========== TEST ========== -->
<!-- =================================== -->
- <target name="test" depends="compile">
+ <target name="test" depends="compile" description="Runs the tests">
<ant antfile="${test}/build.xml" target="test" inheritRefs="true"/>
</target>
@@ -140,11 +213,11 @@
<mkdir dir="${out.dist.lib}"/>
</target>
- <target name="jar" depends="dist.init,compile">
+ <target name="jar" depends="dist.init,compile" description="Generates the
jar files">
<multipleAnt dir="${archive}"/>
</target>
- <target name="jdoc" depends="init,dist.init">
+ <target name="jdoc" depends="init,dist.init" description="Generates the
Javadoc">
<copy todir="${out.dist.doc}"
preservelastmodified="yes"
includeEmptyDirs="false">
@@ -156,7 +229,12 @@
<multipleAnt dir="${jdoc}"/>
</target>
- <target name="examples" depends="init,dist.init" if="examples.exist">
+ <!-- =================================== -->
+ <!-- ========== EXAMPLES ========== -->
+ <!-- =================================== -->
+
+ <target name="examples" depends="init,dist.init,jar" if="examples.exist"
+ description="Generates the example files" >
<mkdir dir="${out.dist.examples}"/>
<copy todir="${out.dist.examples}"
preservelastmodified="yes"
@@ -194,10 +272,6 @@
<zip zipFile="${out.dist}/src.zip" basedir="${src}"/>
</target>
- <!-- =================================== -->
- <!-- ========== EXAMPLES ========== -->
- <!-- =================================== -->
-
<target name="example" depends="jar,examples">
<ant
inheritAll="false"
@@ -211,7 +285,7 @@
<!-- creates zip files of the different distribution (source, binaries) -->
- <target name="zip" depends="dist">
+ <target name="zip" depends="dist" description="Creates the source
distribution">
<mkdir dir="${out.zip}"/>
<tar destfile="${out.zip}/${product.name}-${product.version}.tar.gz"
compression="gzip">
@@ -236,28 +310,17 @@
</target>
<!-- =================================== -->
- <!-- ========== WEB ========== -->
- <!-- =================================== -->
-
- <target name="web">
- <!--ant dir="${web}"/-->
- </target>
-
- <!-- =================================== -->
<!-- ========== CLEAN ========== -->
<!-- =================================== -->
<!-- remove all directories -->
- <target name="clean.web" if="web.exist">
- <ant dir="${web}" target="clean"/>
- </target>
-
- <target name="clean" depends="properties,clean.web">
+ <target name="clean" depends="properties" description="Removes all
generated files">
<delete dir="${out.build}"/>
<delete dir="${out.dist}"/>
<delete dir="${out.zip}"/>
<delete dir="${out.test}"/>
+ <delete dir="${out.generated}"/>
</target>
<!-- ==================================== -->
@@ -265,23 +328,28 @@
<!-- ==================================== -->
<target name="help">
- <echo message="The available targets are the following:"/>
- <echo message=" compile: compiles the product into ${out.build}"/>
- <echo message=" dist: creates the product's distributions into
${out.dist}"/>
- <echo message=" zip: creates the product's distributions zip files into
${out.zip}"/>
- <echo message=" clean: removes all generated files."/>
- <echo message=" jar: creates all jars in ${out.dist.lib}"/>
- <echo message=" test: run all tests"/>
+ <echo message="${product.name}-${product.version}"/>
+ <echo message="INRIA & France Telecom implementation of the Fractal
Specifications"/>
+ <echo message=""/>
+ <echo message="The main Ant targets are:"/>
+ <echo message=" compile: compiles ${product.name}"/>
+ <echo message=" test: runs the tests"/>
+ <echo message=" jar: generates the jar files"/>
+ <echo message=" jdoc: generates the Javadoc"/>
+ <echo message=" zip: creates the source distribution"/>
+ <echo message=" clean: removes all generated files"/>
+ <echo message=""/>
+ <echo message="To run the examples, type:"/>
+ <echo message=" ant examples"/>
+ <echo message=" cd output/dist/examples/xxx"/>
+ <echo message=" ant execute"/>
<echo message=""/>
- <echo message="There are some options to run tests:"/>
- <echo message=" -Dtest.group=<group name> Only a group of test:
The default target of"/>
- <echo message=" the xml file is called the test.group contains the
xml file name with"/>
- <echo message=" directory ex: ant -Dtest.group=conform/toto test
=> calls the default"/>
- <echo message=" target of the file ${test}/conform/toto.xml"/>
- <echo message=" -Dtest.type=<type name> Only a type of test:
conform, deviance, stress,"/>
- <echo message=" thread or perf. The test.type properties contains the
directory name of"/>
- <echo message=" the test type ex: ant -Dtest.type=conform test"/>
- <echo message=" -Dtest.name=<test name> Only a single test. The
target <test name> is called"/>
+ <echo message="where xxx is one of:"/>
+ <echo message=" - collection: collection interfaces and autobound
components"/>
+ <echo message=" - helloworld: Fractal Hello world"/>
+ <echo message=" - interceptor: interceptors written with
SimpleCodeGenerator"/>
+ <echo message=" - membrane: component-based engineering of control
membranes"/>
+ <echo message=" - protoactive: asynchronous component operation calls
with futures"/>
</target>
</project>
Index: julia/config/juliak/dtdparser.jar
<<Binary file>>
Index: julia/config/juliak/fractal-adl.jar
<<Binary file>>
Index: julia/config/juliak/ow_deployment_scheduling.jar
<<Binary file>>
Index: julia/config/juliak/spoon-1.0.jar
<<Binary file>>
Index: julia/examples/common/etc/build.properties
diff -u julia/examples/common/etc/build.properties:1.4
julia/examples/common/etc/build.properties:1.5
--- julia/examples/common/etc/build.properties:1.4 Thu Jan 5 10:47:08
2006
+++ julia/examples/common/etc/build.properties Tue Oct 24 12:56:19 2006
@@ -12,10 +12,16 @@
fractal.path ../../externals/fractal.jar
+# Class path of the Monolog library
+# See http://monolog.objectweb.org
+
+monolog.path ../../externals/ow_monolog.jar
+
# Class path of Julia (Fractal API implementation, version 2.0 or higher)
# See http://fractal.objectweb.org
julia.path
../../lib/julia-asm.jar:../../lib/julia-mixins.jar:../../lib/julia-runtime.jar
+juliak.path ../../lib/juliak.jar
# Class path of Julia J2ME (Fractal API implementation, version 2.0 or
higher)
# See http://fractal.objectweb.org
Index: julia/examples/membrane/README.txt
diff -u /dev/null julia/examples/membrane/README.txt:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/README.txt Tue Oct 24 12:56:19 2006
@@ -0,0 +1,9 @@
+This example illustrates the features of Julia for the component-based
+engineering of control membranes.
+
+The three existing subpackages illustrates:
+- glue: the dynamic binding of a control membrane to a content instance,
+- interceptor: the dynamic adding and removing of an interceptor,
+- intropect: the introspection of a control membrane.
+
+October 20, 2006. <Lionel.Seinturier@xxxxxxx>
\ No newline at end of file
Index: julia/examples/membrane/build.xml
diff -u /dev/null julia/examples/membrane/build.xml:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/build.xml Tue Oct 24 12:56:19 2006
@@ -0,0 +1,83 @@
+<!--
+ ! This library is free software; you can redistribute it and/or
+ ! modify it under the terms of the GNU Lesser General Public
+ ! License as published by the Free Software Foundation; either
+ ! version 2 of the License, or (at your option) any later version.
+ !
+ ! This library is distributed in the hope that it will be useful,
+ ! but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ! Lesser General Public License for more details.
+ !
+ ! You should have received a copy of the GNU Lesser General Public
+ ! License along with this library; if not, write to the Free Software
+ ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ !
+ ! Contact: sebastien.chassande@xxxxxxxxxxxx
+-->
+
+<project name="Examples" default="compile">
+
+ <!-- directory definition -->
+
+ <property name="src" value="${basedir}/src"/>
+ <property name="build" value="${basedir}/build"/>
+
+ <property file="${basedir}/../etc/build.properties"/>
+ <property file="${basedir}/etc/build.properties"/>
+ <property file="${basedir}/etc/execute.properties"/>
+
+ <!-- Building of a path which contains external jars -->
+
+ <path id="classpath">
+ <pathelement path="${asm.path}"/>
+ <pathelement path="${fractal.path}"/>
+ <pathelement path="${monolog.path}"/>
+ <pathelement path="${julia.path}"/>
+ <pathelement path="${juliak.path}"/>
+ <fileset dir="${basedir}">
+ <include name="lib/**/*.jar"/>
+ </fileset>
+ <fileset dir="${basedir}/..">
+ <include name="lib/**/*.jar"/>
+ </fileset>
+ <pathelement location="${build}"/>
+ </path>
+
+ <!-- ================================== -->
+ <!-- EXECUTE -->
+ <!-- ================================== -->
+
+ <target name="execute" depends="compile">
+ <java classname="${run.classname}"
+ classpathref="classpath"
+ fork="yes"
+ failonerror="yes">
+ <jvmarg line="${run.jvm.parameters}"/>
+ <arg line="${run.parameters}"/>
+ </java>
+ </target>
+
+ <!-- ================================== -->
+ <!-- COMPILE -->
+ <!-- ================================== -->
+
+ <target name="compile">
+ <mkdir dir="${build}"/>
+ <javac srcdir="${src}" destdir="${build}" debug="on">
+ <classpath refid="classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ <copy todir="${build}">
+ <fileset dir="${src}" includes="**/*.fractal" />
+ </copy>
+ </target>
+
+ <!-- ================================== -->
+ <!-- CLEAN -->
+ <!-- ================================== -->
+
+ <target name="clean">
+ <delete dir="${build}"/>
+ </target>
+</project>
Index: julia/examples/membrane/etc/execute.properties
diff -u /dev/null julia/examples/membrane/etc/execute.properties:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/etc/execute.properties Tue Oct 24 12:56:19
2006
@@ -0,0 +1,12 @@
+run.jvm.parameters \
+ -Dfractal.provider=org.objectweb.fractal.juliak.Juliak
+
+# Java class to be launched
+
+run.classname membrane.Main
+
+# Application arguments
+# add "templates" to build the components through templates
+# add "wrapper" to add an additional composite around each primitive
+
+run.parameters
Index: julia/examples/membrane/etc/julia.cfg
diff -u /dev/null julia/examples/membrane/etc/julia.cfg:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/etc/julia.cfg Tue Oct 24 12:56:19 2006
@@ -0,0 +1,613 @@
+###############################################################################
+# STANDARD JULIA CONFIGURATION FILE - DO NOT EDIT
+#
+# PUT NEW OR OVERRIDEN DEFINITIONS AT THE END OF THE FILE, OR IN OTHER FILES
+###############################################################################
+
+#
-----------------------------------------------------------------------------
+# INTERFACE CLASS GENERATORS
+#
-----------------------------------------------------------------------------
+
+# default class generator, generates sub classes of BasicComponentInterface
+
+(interface-class-generator
+ (org.objectweb.fractal.julia.asm.InterfaceClassGenerator
+ org.objectweb.fractal.julia.BasicComponentInterface
+ )
+)
+
+#
-----------------------------------------------------------------------------
+# CONTROLLER INTERFACES
+#
+# each definition must be of the form (interface-name interface-signature)
+#
-----------------------------------------------------------------------------
+
+# Component interface
+
+(component-itf
+ (component org.objectweb.fractal.api.Component)
+)
+
+# TypeFactory interface
+
+(type-factory-itf
+ (type-factory org.objectweb.fractal.api.type.TypeFactory)
+)
+
+# GenericFactory interface
+
+(generic-factory-itf
+ (generic-factory org.objectweb.fractal.api.factory.GenericFactory)
+)
+
+# Factory interface
+
+(factory-itf
+ # choose one of the following definitions:
+ # the first one provides only the Fractal Factory interface
+ # the second one provides a Julia extension of the Factory interface
+ # (factory org.objectweb.fractal.api.factory.Factory)
+ (factory org.objectweb.fractal.julia.factory.Template)
+)
+
+(julia-factory-itf
+ (/template org.objectweb.fractal.julia.factory.Template)
+)
+
+# AttributeController interface
+
+(attribute-controller-itf
+ (attribute org.objectweb.fractal.api.control.AttributeController)
+)
+
+(julia-attribute-controller-itf
+ (/cloneable-attribute-controller
org.objectweb.fractal.julia.control.attribute.CloneableAttributeController)
+)
+
+# BindingController interface
+
+(binding-controller-itf
+ (binding-controller org.objectweb.fractal.api.control.BindingController)
+)
+
+# ContentController interface
+
+(content-controller-itf
+ (content-controller org.objectweb.fractal.api.control.ContentController)
+)
+
+# SuperController interface
+
+(super-controller-itf
+ # choose one of the following definitions:
+ # the first one provides only the Fractal SuperController interface
+ # the second one provides a Julia extension of the SuperController
interface
+ # (super-controller org.objectweb.fractal.api.control.SuperController)
+ (super-controller
org.objectweb.fractal.julia.control.content.SuperControllerNotifier)
+)
+
+(julia-super-controller-itf
+ (/super-controller-notifier
org.objectweb.fractal.julia.control.content.SuperControllerNotifier)
+)
+
+# LifeCycleController interface
+
+(lifecycle-controller-itf
+ # choose one of the following definitions:
+ # the first one provides only the Fractal LifeCycleController interface
+ # the second one provides a Julia extension of the LifeCycleController
interface
+ # (lifecycle-controller
org.objectweb.fractal.api.control.LifeCycleController)
+ (lifecycle-controller
org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator)
+)
+
+(julia-lifecycle-controller-itf
+ (/lifecycle-coordinator
org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator)
+)
+
+# NameController interface
+
+(name-controller-itf
+ (name-controller org.objectweb.fractal.api.control.NameController)
+)
+
+#
-----------------------------------------------------------------------------
+# CONTROLLER OBJECTS
+#
+# each definition must be an object descriptor
+#
-----------------------------------------------------------------------------
+
+# Component implementation
+
+(component-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ ComponentImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.BasicComponentMixin
+ # to check type related constraints, and for collection interfaces
support:
+ org.objectweb.fractal.julia.TypeComponentMixin
+ ))
+)
+
+# TypeFactory implementation
+
+(type-factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ TypeFactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.type.BasicTypeFactoryMixin
+ ))
+)
+
+# GenericFactory implementation
+
+(generic-factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ GenericFactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.BasicInitializableMixin
+ org.objectweb.fractal.julia.loader.UseLoaderMixin
+ org.objectweb.fractal.julia.type.UseTypeFactoryMixin
+ org.objectweb.fractal.julia.factory.BasicGenericFactoryMixin
+ # to check the component content descriptor with the Java Reflection API:
+ org.objectweb.fractal.julia.factory.CheckGenericFactoryMixin
+ ))
+)
+
+# Factory implementation (for template components)
+
+(factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ FactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.factory.BasicTemplateMixin
+ # to copy the template's attributes to the components it creates:
+
org.objectweb.fractal.julia.control.attribute.UseCloneableAttributeControllerMixin
+ org.objectweb.fractal.julia.factory.AttributeTemplateMixin
+ # to copy the template's name to the components it creates:
+ org.objectweb.fractal.julia.control.name.UseNameControllerMixin
+ org.objectweb.fractal.julia.factory.NameTemplateMixin
+ ))
+)
+
+# Factory implementation (for singleton template components)
+
+(singleton-factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ SingletonFactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.factory.BasicTemplateMixin
+ # to copy the template's attributes to the components it creates:
+
org.objectweb.fractal.julia.control.attribute.UseCloneableAttributeControllerMixin
+ org.objectweb.fractal.julia.factory.AttributeTemplateMixin
+ # to copy the template's name to the components it creates:
+ org.objectweb.fractal.julia.control.name.UseNameControllerMixin
+ org.objectweb.fractal.julia.factory.NameTemplateMixin
+ # to provide the singleton semantics to the template:
+ org.objectweb.fractal.julia.factory.SingletonTemplateMixin
+ ))
+)
+
+# BindingController implementation (for primitive components without content)
+
+(primitive-binding-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ PrimitiveBindingControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin
+ # to initialize the BasicBindingControllerMixin from the component's
type:
+ org.objectweb.fractal.julia.control.binding.TypeBasicBindingMixin
+ # to check some basic pre conditions (interface not already bound, ...)
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.binding.CheckBindingMixin
+ # to check type related constraints for bindings:
+ org.objectweb.fractal.julia.control.binding.TypeBindingMixin
+ # to check content related constraints for bindings:
+ org.objectweb.fractal.julia.control.content.UseSuperControllerMixin
+ org.objectweb.fractal.julia.control.binding.ContentBindingMixin
+ # to check lifecycle related constraints for bindings:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin
+ ))
+)
+
+# BindingController implementation (for primitive components with content)
+
+(container-binding-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ ContainerBindingControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+
org.objectweb.fractal.julia.control.binding.ContainerBindingControllerMixin
+ # to skip Interface objects before delegating to the encapsulated
component:
+ #
org.objectweb.fractal.julia.control.binding.OptimizedContainerBindingMixin
+ # to manage output interceptors:
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.binding.InterceptorBindingMixin
+ # to check some basic pre conditions (interface not already bound, ...)
+ org.objectweb.fractal.julia.control.binding.CheckBindingMixin
+ # to check type related constraints for bindings:
+ org.objectweb.fractal.julia.control.binding.TypeBindingMixin
+ # to check content related constraints for bindings:
+ org.objectweb.fractal.julia.control.content.UseSuperControllerMixin
+ org.objectweb.fractal.julia.control.binding.ContentBindingMixin
+ # to check lifecycle related constraints for bindings:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin
+ ))
+)
+
+# BindingController implementation (for composite components)
+
+(composite-binding-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ CompositeBindingControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin
+ # to initialize the BasicBindingControllerMixin from the component's
type:
+ org.objectweb.fractal.julia.control.binding.TypeBasicBindingMixin
+ # to check some basic pre conditions (interface not already bound, ...)
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.binding.CheckBindingMixin
+ # to check type related constraints for bindings:
+ org.objectweb.fractal.julia.control.binding.TypeBindingMixin
+ # to check content related constraints for bindings:
+ org.objectweb.fractal.julia.control.content.UseSuperControllerMixin
+ org.objectweb.fractal.julia.control.binding.ContentBindingMixin
+ # to check lifecycle related constraints for bindings:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin
+ # to manage the getFcItfImpl links of the Interface objects:
+ # choose one of ComponentBindingMixin and OptimizedCompositeBindingMixin
+ # (the last one creates and updates shortcuts links when possible)
+ org.objectweb.fractal.julia.control.content.UseContentControllerMixin
+ # org.objectweb.fractal.julia.control.binding.CompositeBindingMixin
+
org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin
+ ))
+)
+
+# ContentController implementation
+
+(content-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ ContentControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.content.BasicContentControllerMixin
+ # to check some basic pre conditions, and to prevent hierarchy cycles:
+ org.objectweb.fractal.julia.control.content.CheckContentMixin
+ # to check type related constraints in getFcInternalInterface:
+ org.objectweb.fractal.julia.control.content.TypeContentMixin
+ # to check binding locality related constraints in removeFcSubComponent:
+ org.objectweb.fractal.julia.control.content.BindingContentMixin
+ # to check lifecycle related constraints:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.content.LifeCycleContentMixin
+ # to notify sub components when they are added or removed from this
component:
+ org.objectweb.fractal.julia.control.content.SuperContentMixin
+ ))
+)
+
+# SuperController implementation
+
+(super-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ SuperControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.content.BasicSuperControllerMixin
+ ))
+)
+
+# LifeCycleController implementation (for primitive or composite components)
+
+(lifecycle-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ LifeCycleControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleControllerMixin
+ # to check that mandatory client interfaces are bound in startFc:
+ org.objectweb.fractal.julia.control.lifecycle.TypeLifeCycleMixin
+ # to notify the encapsulated component (if present) when its state
changes:
+ org.objectweb.fractal.julia.control.lifecycle.ContainerLifeCycleMixin
+ ))
+)
+
+# LifeCycleController implementation (for composite components only)
+
+(composite-lifecycle-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ CompositeLifeCycleControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorMixin
+
org.objectweb.fractal.julia.control.lifecycle.OptimizedLifeCycleControllerMixin
+ # to check that mandatory client interfaces are bound in startFc:
+ org.objectweb.fractal.julia.control.lifecycle.TypeLifeCycleMixin
+ ))
+)
+
+# NameController implementation
+
+(name-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ NameControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.name.BasicNameControllerMixin
+ ))
+)
+
+#
-----------------------------------------------------------------------------
+# CONTROLLER DESCRIPTORS
+#
-----------------------------------------------------------------------------
+
+(optimizationLevel
+ # choose one of the following optimization options:
+ none
+ # mergeControllers
+ # mergeControllersAndInterceptors
+ # mergeControllersAndContent
+ # mergeControllersInterceptorsAndContent
+)
+
+(bootstrap
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'type-factory-itf
+ 'generic-factory-itf
+ (loader org.objectweb.fractal.julia.loader.Loader)
+ )
+ (
+ 'component-impl
+ 'type-factory-impl
+ 'generic-factory-impl
+ # choose one of the following classes:
+ # the first one loads all classes from the classpath
+ # the second one can generate missing classes on the fly, dynamically
+ # org.objectweb.fractal.julia.loader.BasicLoader
+ org.objectweb.fractal.julia.loader.DynamicLoader
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ none
+ )
+)
+
+(primitive
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ )
+ (
+ 'component-impl
+ 'container-binding-controller-impl
+ 'super-controller-impl
+ 'lifecycle-controller-impl
+ 'name-controller-impl
+ )
+ (
+ (org.objectweb.fractal.julia.asm.InterceptorClassGenerator
+ org.objectweb.fractal.julia.asm.LifeCycleCodeGenerator
+ )
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricPrimitive
+ 'primitive
+)
+
+(composite
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ )
+ (
+ 'component-impl
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'composite-lifecycle-controller-impl
+ 'name-controller-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricComposite
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ )
+ (
+ 'component-impl
+ ((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator
+ ('attributeControllerInterface)
+ ))
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'composite-lifecycle-controller-impl
+ 'name-controller-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(primitiveTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ 'primitive-binding-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricPrimitiveTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'julia-attribute-controller-itf
+ 'binding-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ ((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator
+ ('attributeControllerInterface)
+ ))
+ 'primitive-binding-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(compositeTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricCompositeTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'julia-attribute-controller-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ ((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator
+ ('attributeControllerInterface)
+ ))
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+###############################################################################
+# CUSTOM CONFIGURATION INFORMATION
+###############################################################################
+
+# no custom definitions
Index: julia/examples/membrane/lib/dtdparser.jar
<<Binary file>>
Index: julia/examples/membrane/lib/fractal-adl.jar
<<Binary file>>
Index: julia/examples/membrane/lib/ow_deployment_scheduling.jar
<<Binary file>>
Index: julia/examples/membrane/src/membrane/Main.java
diff -u /dev/null julia/examples/membrane/src/membrane/Main.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/Main.java Tue Oct 24 12:56:19
2006
@@ -0,0 +1,55 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package membrane;
+
+
+/**
+ * This class launches the different versions of the membrane engineering
+ * example.
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+
+
System.err.println("===================================================");
+ System.err.println("==== Membrane introspection
====");
+
System.err.println("===================================================");
+ membrane.introspect.Main.main(args);
+
+ System.err.println();
+
System.err.println("===================================================");
+ System.err.println("==== Dynamic binding of a control membrane to a
content instance");
+
System.err.println("===================================================");
+ membrane.glue.Main.main(args);
+
+ System.err.println();
+
System.err.println("===================================================");
+ System.err.println("==== Dynamic management of interceptors
====");
+
System.err.println("===================================================");
+ membrane.interceptor.Main.main(args);
+
+ }
+}
Index:
julia/examples/membrane/src/membrane/glue/BasicLoggerControllerImpl.java
diff -u /dev/null
julia/examples/membrane/src/membrane/glue/BasicLoggerControllerImpl.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/BasicLoggerControllerImpl.java
Tue Oct 24 12:56:17 2006
@@ -0,0 +1,258 @@
+/**
+ * Dream
+ * Copyright (C) 2003-2004 INRIA Rhone-Alpes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: dream@xxxxxxxxxxxxx
+ *
+ * Initial developer(s): Matthieu Leclercq
+ * Contributor(s): Lionel Seinturier
+ */
+
+package membrane.glue;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.objectweb.fractal.julia.Controller;
+import org.objectweb.fractal.julia.InitializationContext;
+import org.objectweb.util.monolog.Monolog;
+import org.objectweb.util.monolog.api.BasicLevel;
+import org.objectweb.util.monolog.api.Logger;
+
+/**
+ * Basic implementation of logger controller. A
<code>"monolog-conf-file"</code>
+ * initialisation parameter can be set to specify the location of the monolog
+ * configuration file.
+ */
+public class BasicLoggerControllerImpl
+ implements LoggerController, LoggerControllerRegister, Controller
+{
+
+ String baseName;
+
+ /** Map associating logger name and list of registred loggables */
+ Map registrations;
+ /** Map associating logger name and logger instance */
+ Map loggers;
+ Logger baseLogger;
+
+
+ public void initFcController(InitializationContext ic) {
+
+ String monologConfFile = "etc/monolog.properties";
+ if (Monolog.monologFactory == Monolog.getDefaultMonologFactory())
+ {
+ Monolog.getMonologFactory(monologConfFile);
+ }
+
+ baseName = Util.getNextUnnamedBaseName();
+ registrations = new HashMap();
+ loggers = new HashMap();
+ }
+
+ //
-------------------------------------------------------------------------
+ // Fields and methods added and overriden by the mixin class
+ //
-------------------------------------------------------------------------
+
+ /**
+ * @see LoggerControllerItf#getBaseName()
+ */
+ public String getBaseName()
+ {
+ return baseName;
+ }
+
+ /**
+ * @see LoggerControllerItf#setBaseName(String)
+ */
+ public void setBaseName(String name)
+ {
+ this.baseName = name;
+ baseNameChanged();
+ }
+
+ /**
+ * @see LoggerControllerItf#getLoggerLevel(String)
+ */
+ public int getLoggerLevel(String loggerName)
+ {
+ Logger l = (Logger) loggers.get(loggerName);
+ if (l == null)
+ {
+ if (loggerName == null)
+ {
+ if (baseLogger == null)
+ {
+ baseLogger = Monolog.monologFactory.getLogger(baseName);
+ }
+ l = baseLogger;
+ }
+ else
+ {
+ return INHERIT;
+ }
+ }
+ int i = l.getCurrentIntLevel();
+ if (i == BasicLevel.DEBUG)
+ return DEBUG;
+ if (i == BasicLevel.INFO)
+ return INFO;
+ if (i == BasicLevel.WARN)
+ return WARN;
+ if (i == BasicLevel.ERROR)
+ return ERROR;
+ if (i == BasicLevel.FATAL)
+ return FATAL;
+ if (i == BasicLevel.INHERIT)
+ return INHERIT;
+ throw new IllegalStateException("Unknown logger level : " + i);
+ }
+
+ /**
+ * @see LoggerControllerItf#setLoggerLevel(String, int)
+ */
+ public void setLoggerLevel(String loggerName, int level)
+ {
+ Logger l = (Logger) loggers.get(loggerName);
+ if (l == null)
+ {
+ if (loggerName == null)
+ {
+ if (baseLogger == null)
+ {
+ baseLogger = Monolog.monologFactory.getLogger(baseName);
+ }
+ l = baseLogger;
+ }
+ else
+ {
+ return;
+ }
+ }
+ switch (level)
+ {
+ case DEBUG :
+ l.setLevel(BasicLevel.LEVEL_DEBUG);
+ break;
+ case INFO :
+ l.setLevel(BasicLevel.LEVEL_INFO);
+ break;
+ case WARN :
+ l.setLevel(BasicLevel.LEVEL_WARN);
+ break;
+ case ERROR :
+ l.setLevel(BasicLevel.LEVEL_ERROR);
+ break;
+ case FATAL :
+ l.setLevel(BasicLevel.LEVEL_FATAL);
+ break;
+ case INHERIT :
+ l.setLevel(BasicLevel.LEVEL_INHERIT);
+ break;
+ default :
+ throw new IllegalArgumentException("Unknown level " + level);
+ }
+ }
+
+ /**
+ * @see LoggerControllerItf#getLoggerNames()
+ */
+ public String[] getLoggerNames()
+ {
+ return (String[]) loggers.keySet().toArray(new String[loggers.size()]);
+ }
+
+ /**
+ * @see LoggerControllerRegister#register(String, Loggable)
+ */
+ public void register(String loggerName, Loggable loggable)
+ {
+ Set s = (Set) registrations.get(loggerName);
+ if (s == null)
+ {
+ s = new HashSet();
+ registrations.put(loggerName, s);
+ }
+ s.add(loggable);
+ giveLogger(loggerName, loggable);
+ }
+
+ /**
+ * @see LoggerControllerRegister#unregiser(String, Loggable)
+ */
+ public void unregister(String loggerName, Loggable loggable)
+ {
+ Set s = (Set) registrations.get(loggerName);
+ if (s == null)
+ {
+ return;
+ }
+ s.remove(loggable);
+ if (s.isEmpty())
+ {
+ // no more registration for this logger, remove reference to it, for
+ // garbage collector
+ registrations.remove(loggerName);
+ loggers.remove(loggerName);
+ }
+ }
+
+ //
---------------------------------------------------------------------------
+ // Utility methods
+ //
---------------------------------------------------------------------------
+
+ void baseNameChanged()
+ {
+ loggers.clear();
+ Iterator iter = registrations.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry entry = (Map.Entry) iter.next();
+ String loggerName = (String) entry.getKey();
+ Set loggables = (Set) entry.getValue();
+ Iterator iter2 = loggables.iterator();
+ while (iter2.hasNext())
+ {
+ Loggable loggable = (Loggable) iter2.next();
+ giveLogger(loggerName, loggable);
+ }
+ }
+ }
+
+ void giveLogger(String loggerName, Loggable loggable)
+ {
+ Logger logger = (Logger) loggers.get(loggerName);
+ if (logger == null)
+ {
+ String name;
+ if (loggerName == null)
+ {
+ name = baseName;
+ }
+ else
+ {
+ name = baseName + "." + loggerName;
+ }
+ logger = Monolog.monologFactory.getLogger(name);
+ loggers.put(loggerName, logger);
+ }
+ loggable.setLogger(loggerName, logger);
+ }
+}
Index: julia/examples/membrane/src/membrane/glue/C.java
diff -u /dev/null julia/examples/membrane/src/membrane/glue/C.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/C.java Tue Oct 24 12:56:17
2006
@@ -0,0 +1,47 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package membrane.glue;
+
+import org.objectweb.util.monolog.api.BasicLevel;
+import org.objectweb.util.monolog.api.Logger;
+
+
+/**
+ * Content class for the membrane.glue example.
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class C implements Runnable, Loggable {
+
+ public void run() {
+ logger.log( BasicLevel.INFO, "Hello World from "+this );
+ }
+
+ private Logger logger;
+
+ public void setLogger(String name, Logger logger) {
+ this.logger = logger;
+ }
+
+}
Index: julia/examples/membrane/src/membrane/glue/Loggable.java
diff -u /dev/null julia/examples/membrane/src/membrane/glue/Loggable.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/Loggable.java Tue Oct 24
12:56:17 2006
@@ -0,0 +1,44 @@
+/**
+ * Dream
+ * Copyright (C) 2003-2004 INRIA Rhone-Alpes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: dream@xxxxxxxxxxxxx
+ *
+ * Initial developer(s): Matthieu Leclercq
+ * Contributor(s):
+ */
+
+package membrane.glue;
+
+import org.objectweb.util.monolog.api.Logger;
+
+/**
+ * Interface used to give logger to a component implementation or a
controller
+ * that has register with the logger controller using
+ * {@link LoggerControllerRegister#register(String, Loggable)}.
+ */
+public interface Loggable
+{
+
+ /**
+ * Gives the logger.
+ *
+ * @param name the registration name.
+ * @param logger the logger.
+ */
+ void setLogger(String name, Logger logger);
+}
\ No newline at end of file
Index: julia/examples/membrane/src/membrane/glue/LoggablePrimitive.fractal
diff -u /dev/null
julia/examples/membrane/src/membrane/glue/LoggablePrimitive.fractal:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/LoggablePrimitive.fractal Tue
Oct 24 12:56:17 2006
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN"
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+
+<!--
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ -->
+
+<definition
+ name="membrane.glue.LoggablePrimitive"
+
extends="org.objectweb.fractal.juliak.membrane.Primitive,membrane.glue.LoggerControllerType"
>
+
+ <component name="LogC" definition="membrane.glue.LoggerController" />
+
+ <binding client="this.//logger-controller"
server="LogC.//logger-controller" />
+ <binding client="this.///logger-controller-register"
server="LogC.///logger-controller-register" />
+
+</definition>
Index: julia/examples/membrane/src/membrane/glue/LoggerController.fractal
diff -u /dev/null
julia/examples/membrane/src/membrane/glue/LoggerController.fractal:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/LoggerController.fractal Tue
Oct 24 12:56:17 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN"
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+
+<!--
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ -->
+
+<definition
+ name="membrane.glue.LoggerController"
+ extends="membrane.glue.LoggerControllerType" >
+
+ <content class="membrane.glue.BasicLoggerControllerImpl" />
+
+ <controller desc="mPrimitive" />
+</definition>
Index: julia/examples/membrane/src/membrane/glue/LoggerController.java
diff -u /dev/null
julia/examples/membrane/src/membrane/glue/LoggerController.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/LoggerController.java Tue
Oct 24 12:56:17 2006
@@ -0,0 +1,93 @@
+/**
+ * Dream
+ * Copyright (C) 2003-2004 INRIA Rhone-Alpes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact : dream@xxxxxxxxxxxxx
+ *
+ * Initial developer(s): Matthieu Leclercq
+ * Contributor(s): Vivien Quema
+ */
+
+package membrane.glue;
+
+/**
+ * Controller interface to control
+ * {@link org.objectweb.util.monolog.api.Logger loggers }associated with the
+ * component this controller belong. Every loggers define in a component
shared
+ * the same base name and have a suffix (can be <code>null</code>).
+ */
+public interface LoggerController
+{
+ /**
+ * Logger level for debug message. <br/>This constant can be used to change
+ * logger level remotly. Indeed, monolog
+ * {@link org.objectweb.util.monolog.api.BasicLevel }levels must be
+ * initialized by monolog factories. So if this interface is used remotly,
the
+ * caller may not have initialized it.
+ */
+ int DEBUG = 0;
+ /** Logger level for info message. */
+ int INFO = 1;
+ /** Logger level for warning message. */
+ int WARN = 2;
+ /** Logger level for error message. */
+ int ERROR = 3;
+ /** Logger level for fatal message. */
+ int FATAL = 4;
+ /**
+ * Logger level indicates that the level is inherited from logger's
ancestors.
+ */
+ int INHERIT = 5;
+
+ /**
+ * Sets the loggers' base name.
+ *
+ * @param name the base name
+ */
+ void setBaseName(String name);
+
+ /**
+ * Returns the loggers' base name.
+ *
+ * @return the loggers' base name.
+ */
+ String getBaseName();
+
+ /**
+ * Returns the current logging level of a logger
+ *
+ * @param loggerName the name of the logger
+ * @return the current logging level of a logger. Returns
<code>INHERIT</code>
+ * if given name is unknown.
+ */
+ int getLoggerLevel(String loggerName);
+
+ /**
+ * Sets the logging level of a logger.
+ *
+ * @param loggerName the name of the logger
+ * @param level a level
+ */
+ void setLoggerLevel(String loggerName, int level);
+
+ /**
+ * Returns the name of every registered loggers.
+ *
+ * @return an array of registered loggers name.
+ */
+ String[] getLoggerNames();
+}
\ No newline at end of file
Index: julia/examples/membrane/src/membrane/glue/LoggerControllerRegister.java
diff -u /dev/null
julia/examples/membrane/src/membrane/glue/LoggerControllerRegister.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/LoggerControllerRegister.java
Tue Oct 24 12:56:17 2006
@@ -0,0 +1,51 @@
+/**
+ * Dream
+ * Copyright (C) 2003-2004 INRIA Rhone-Alpes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: dream@xxxxxxxxxxxxx
+ *
+ * Initial developer(s): Matthieu Leclercq
+ * Contributor(s):
+ */
+
+package membrane.glue;
+
+/**
+ * Interface implemented by logger controller to allow other controllers and
+ * content class to register as <i>logger controller client <i>.
+ */
+public interface LoggerControllerRegister
+{
+
+ /**
+ * Registers a loggable as client of this logger controller for the
specified
+ * logger name.
+ *
+ * @param loggerName a logger name
+ * @param loggable a loggable object (controller or content class).
+ */
+ void register(String loggerName, Loggable loggable);
+
+ /**
+ * Un registers a loggable.
+ *
+ * @param loggerName the registred logger name
+ * @param loggable the registred loggable object (controller or content
+ * class).
+ */
+ void unregister(String loggerName, Loggable loggable);
+}
\ No newline at end of file
Index: julia/examples/membrane/src/membrane/glue/LoggerControllerType.fractal
diff -u /dev/null
julia/examples/membrane/src/membrane/glue/LoggerControllerType.fractal:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/LoggerControllerType.fractal
Tue Oct 24 12:56:17 2006
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN"
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+
+<!--
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ -->
+
+<definition name="membrane.glue.LoggerControllerType">
+ <interface
+ name="//logger-controller"
+ signature="membrane.glue.LoggerController"
+ role="server"
+ />
+
+ <interface
+ name="///logger-controller-register"
+ signature="membrane.glue.LoggerControllerRegister"
+ role="server"
+ />
+</definition>
Index: julia/examples/membrane/src/membrane/glue/Main.java
diff -u /dev/null julia/examples/membrane/src/membrane/glue/Main.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/Main.java Tue Oct 24 12:56:17
2006
@@ -0,0 +1,99 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package membrane.glue;
+
+import org.objectweb.fractal.adl.Factory;
+import org.objectweb.fractal.adl.FactoryFactory;
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.factory.GenericFactory;
+import org.objectweb.fractal.api.type.ComponentType;
+import org.objectweb.fractal.api.type.InterfaceType;
+import org.objectweb.fractal.api.type.TypeFactory;
+import org.objectweb.fractal.util.Fractal;
+
+/**
+ * This class illustrates the dynamic binding of a control membrane to a
content
+ * instance.
+ *
+ * This class starts by dynamically loading and instantiating the
+ * membrane.glue.LoggablePrimitive ADL description with Fractal ADL. This
file
+ * defines a control membrane which extends the control membrane of primitive
+ * components with a logger controller (as defined by the Dream framework).
This
+ * new membrane, represented as a control {@link Component}, is used to
+ * instantiate an application level component with the membrane.glue.C class
as
+ * a content. In addition to the standard controllers of a primitive
component,
+ * this component is also equiped with a logger controller (as defined by the
+ * membrane.glue.LoggablePrimitive control membrane).
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+
+ Component boot = Fractal.getBootstrapComponent();
+ TypeFactory tf = Fractal.getTypeFactory(boot);
+ GenericFactory gf = Fractal.getGenericFactory(boot);
+
+ /*
+ * Create the component type.
+ */
+ ComponentType type =
+ tf.createFcType(
+ new InterfaceType[]{
+ tf.createFcItfType(
+ "r", Runnable.class.getName(), false, false, false)
+ }
+ );
+
+ /*
+ * Load the control membrane.
+ */
+ Factory factory =
+ FactoryFactory.getFactory(FactoryFactory.FRACTAL_BACKEND);
+ Component membrane = (Component)
+ factory.newComponent( "membrane.glue.LoggablePrimitive", null );
+
+ /*
+ * Create a component with the previous control membrane.
+ */
+ Component c = gf.newFcInstance(type, membrane, C.class.getName());
+
+ /*
+ * Register the component with the logger controller defined by
+ * me.glue.LoggablePrimitive.
+ */
+ LoggerControllerRegister lcr = (LoggerControllerRegister)
+ c.getFcInterface("/logger-controller-register");
+ Loggable content = (Loggable) c.getFcInterface("/content");
+ lcr.register("myLogger", content);
+
+ /*
+ * Start and run the application.
+ */
+ Fractal.getLifeCycleController(c).startFc();
+ ((Runnable)c.getFcInterface("r")).run();
+
+ }
+}
Index: julia/examples/membrane/src/membrane/glue/Util.java
diff -u /dev/null julia/examples/membrane/src/membrane/glue/Util.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/glue/Util.java Tue Oct 24 12:56:17
2006
@@ -0,0 +1,48 @@
+/**
+ * Dream
+ * Copyright (C) 2003-2004 INRIA Rhone-Alpes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: dream@xxxxxxxxxxxxx
+ *
+ * Initial developer(s): Matthieu Leclercq
+ * Contributor(s):
+ */
+
+package membrane.glue;
+
+/**
+ * Utility class for logger controller.
+ */
+public final class Util
+{
+
+ private static int nextUnnamedBaseName = 0;
+
+ private Util()
+ {
+ }
+
+ /**
+ * Returns a unique logger base name for an unnamed component.
+ *
+ * @return a unique logger base name for an unnamed component.
+ */
+ public static String getNextUnnamedBaseName()
+ {
+ return "unnamedComponent." + (nextUnnamedBaseName++);
+ }
+}
\ No newline at end of file
Index: julia/examples/membrane/src/membrane/interceptor/C.java
diff -u /dev/null julia/examples/membrane/src/membrane/interceptor/C.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/interceptor/C.java Tue Oct 24
12:56:19 2006
@@ -0,0 +1,37 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package membrane.interceptor;
+
+
+/**
+ * Content class for the membrane.interceptor example.
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class C implements Runnable {
+
+ public void run() {
+ System.err.println( "Hello World from " + this );
+ }
+}
Index: julia/examples/membrane/src/membrane/interceptor/Main.java
diff -u /dev/null
julia/examples/membrane/src/membrane/interceptor/Main.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/interceptor/Main.java Tue Oct 24
12:56:19 2006
@@ -0,0 +1,127 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package membrane.interceptor;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.factory.GenericFactory;
+import org.objectweb.fractal.api.factory.InstantiationException;
+import org.objectweb.fractal.api.type.ComponentType;
+import org.objectweb.fractal.api.type.InterfaceType;
+import org.objectweb.fractal.api.type.TypeFactory;
+import org.objectweb.fractal.julia.ComponentInterface;
+import org.objectweb.fractal.julia.InitializationContext;
+import org.objectweb.fractal.julia.Interceptor;
+import
org.objectweb.fractal.juliak.control.interceptor.InterceptorController;
+import org.objectweb.fractal.util.Fractal;
+
+/**
+ * This class illustrates the usage of the interceptor controller for
+ * dynamically adding and removing an interceptor.
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+
+ Component boot = Fractal.getBootstrapComponent();
+ TypeFactory tf = Fractal.getTypeFactory(boot);
+ GenericFactory gf = Fractal.getGenericFactory(boot);
+
+ /*
+ * Create the component type.
+ */
+ ComponentType type =
+ tf.createFcType(
+ new InterfaceType[]{
+ tf.createFcItfType(
+ "r", Runnable.class.getName(), false, false, false)
+ }
+ );
+
+ /*
+ * Create a primitive component, start it and invoke it.
+ */
+ Component c = gf.newFcInstance(type, "primitive", C.class.getName());
+ Fractal.getLifeCycleController(c).startFc();
+ ComponentInterface itf = (ComponentInterface) c.getFcInterface("r");
+ ((Runnable)itf).run();
+
+ /*
+ * Adding an interceptor.
+ */
+ System.err.println("<< Adding an interceptor");
+ InterceptorController ic = (InterceptorController)
+ c.getFcInterface("/interceptor-controller");
+ Interceptor myInterceptor = new MyInterceptor();
+ ic.addFcInterceptor(itf, myInterceptor);
+
+ /*
+ * Re-invoking the component.
+ */
+ ((Runnable)itf).run();
+
+ /*
+ * Removing the interceptor.
+ */
+ System.err.println("<< Removing the interceptor");
+ ic.removeFcInterceptor(itf, myInterceptor);
+
+ /*
+ * Re-invoking the component.
+ */
+ ((Runnable)itf).run();
+ }
+}
+
+class MyInterceptor implements Runnable, Interceptor {
+
+ public void run() {
+ System.err.println(" [[ In the interceptor ]]");
+ delegate.run();
+ }
+
+ public Object getFcItfDelegate() {
+ return delegate;
+ }
+
+ public void setFcItfDelegate(Object delegate) {
+ this.delegate = (Runnable) delegate;
+ }
+
+ private Runnable delegate;
+
+ public void initFcController(InitializationContext ic) throws
InstantiationException {
+ }
+
+ public Object clone() {
+ try {
+ return super.clone();
+ }
+ catch( CloneNotSupportedException cnse ) {
+ }
+ return null;
+ }
+
+}
\ No newline at end of file
Index: julia/examples/membrane/src/membrane/introspect/Main.java
diff -u /dev/null
julia/examples/membrane/src/membrane/introspect/Main.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/examples/membrane/src/membrane/introspect/Main.java Tue Oct 24
12:56:18 2006
@@ -0,0 +1,101 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package membrane.introspect;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.factory.GenericFactory;
+import org.objectweb.fractal.api.type.ComponentType;
+import org.objectweb.fractal.api.type.InterfaceType;
+import org.objectweb.fractal.api.type.TypeFactory;
+import org.objectweb.fractal.juliak.FractalHelper;
+import org.objectweb.fractal.juliak.control.membrane.MembraneController;
+import org.objectweb.fractal.util.Fractal;
+
+/**
+ * This class illustrates the usage of the membrane controller to introspect
+ * control membranes.
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+
+ Component boot = Fractal.getBootstrapComponent();
+ TypeFactory tf = Fractal.getTypeFactory(boot);
+ GenericFactory gf = Fractal.getGenericFactory(boot);
+
+ ComponentType type =
+ tf.createFcType(
+ new InterfaceType[]{
+ tf.createFcItfType(
+ "r", Runnable.class.getName(), false, true, false)
+ }
+ );
+
+ Component c = gf.newFcInstance(type, "composite", null);
+
+ /*
+ * Get the membrane control which provides the getFcMembrane() method
+ * for retrieving the reference of the control membrane.
+ */
+ Object itf = c.getFcInterface("/membrane-controller");
+ MembraneController mc = (MembraneController) itf;
+ Component membrane = mc.getFcMembrane();
+
+ /*
+ * Display the content of the control membrane.
+ */
+ System.err.println("Membrane introspection for a composite
component");
+ System.err.println();
+ display(membrane);
+ }
+
+ /**
+ * Display a description of the given component: interfaces,
+ * sub-components and bindings.
+ *
+ * @param c a component
+ */
+ private static void display( Component c ) {
+
+ System.err.println(" Interfaces");
+ Object[] itfs = c.getFcInterfaces();
+ for (int i = 0; i < itfs.length; i++) {
+ Interface itf = (Interface) itfs[i];
+ InterfaceType it = (InterfaceType) itf.getFcItfType();
+ System.err.println(" "+i+": "+FractalHelper.toString(it));
+ }
+ System.err.println();
+
+ System.err.println(" Sub-components (control components)");
+ Component[] subs = FractalHelper.getAllSubComponents(c);
+ // start at index 1 to skip c
+ for (int i = 1; i < subs.length; i++) {
+ String name =
FractalHelper.getNameController(subs[i]).getFcName();
+ System.err.println(" "+(i-1)+": "+name);
+ }
+ }
+}
Index: julia/src/org/objectweb/fractal/juliak/BootstrapComponentImpl.java
diff -u /dev/null
julia/src/org/objectweb/fractal/juliak/BootstrapComponentImpl.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/src/org/objectweb/fractal/juliak/BootstrapComponentImpl.java Tue
Oct 24 12:56:20 2006
@@ -0,0 +1,89 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package org.objectweb.fractal.juliak;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Type;
+import org.objectweb.fractal.api.factory.GenericFactory;
+import org.objectweb.fractal.api.factory.InstantiationException;
+import org.objectweb.fractal.api.type.ComponentType;
+import org.objectweb.fractal.api.type.InterfaceType;
+import org.objectweb.fractal.api.type.TypeFactory;
+import org.objectweb.fractal.juliak.factory.GenericFactoryImpl;
+import org.objectweb.fractal.juliak.factory.TypeFactoryImpl;
+
+
+/**
+ * Bootstrap component providing two Fractal interfaces:
+ * <ul>
+ * <li> type-factory which implements {@link TypeFactory} </li>
+ * <li> generic-factory which implements {@link GenericFactoryExt} </li>
+ * </ul>
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class BootstrapComponentImpl implements TypeFactory, GenericFactory {
+
+ // -----------------------------------------------------------------
+ // Implementation of the TypeFactory interface
+ // -----------------------------------------------------------------
+
+ private TypeFactory tf = TypeFactoryImpl.get();
+
+ public InterfaceType createFcItfType(
+ String name, String signature,
+ boolean isClient, boolean isOptional, boolean isCollection)
+ throws InstantiationException {
+
+ return tf.createFcItfType(
+ name,signature,isClient,isOptional,isCollection);
+ }
+
+ public ComponentType createFcType(InterfaceType[] interfaceTypes)
+ throws InstantiationException {
+
+ return tf.createFcType(interfaceTypes);
+ }
+
+ // -----------------------------------------------------------------
+ // Implementation of the GenericFactory interface
+ // -----------------------------------------------------------------
+
+ private GenericFactory gf = GenericFactoryImpl.get();
+
+ public Component newFcInstance(
+ Type type, Object controllerDesc, Object contentDesc)
+ throws InstantiationException {
+
+ return gf.newFcInstance(type,controllerDesc,contentDesc);
+ }
+
+ public Component newFcInstance(
+ Type type, Component membrane, Object contentDesc)
+ throws InstantiationException {
+
+ return gf.newFcInstance(type, membrane, contentDesc);
+ }
+
+}
Index: julia/src/org/objectweb/fractal/juliak/FractalHelper.java
diff -u /dev/null
julia/src/org/objectweb/fractal/juliak/FractalHelper.java:1.1
--- /dev/null Tue Oct 24 12:56:22 2006
+++ julia/src/org/objectweb/fractal/juliak/FractalHelper.java Tue Oct 24
12:56:20 2006
@@ -0,0 +1,346 @@
+/***
+ * AOKell
+ * Copyright (C) 2005-2006 INRIA, France Telecom, USTL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Lionel.Seinturier@xxxxxxx
+ *
+ * Author: Lionel Seinturier
+ */
+
+package org.objectweb.fractal.juliak;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.AttributeController;
+import org.objectweb.fractal.api.control.BindingController;
+import org.objectweb.fractal.api.control.ContentController;
+import org.objectweb.fractal.api.control.IllegalBindingException;
+import org.objectweb.fractal.api.control.IllegalLifeCycleException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import org.objectweb.fractal.api.control.NameController;
+import org.objectweb.fractal.api.control.SuperController;
+import org.objectweb.fractal.api.factory.Factory;
+import org.objectweb.fractal.api.factory.GenericFactory;
+import org.objectweb.fractal.api.type.InterfaceType;
+import org.objectweb.fractal.api.type.TypeFactory;
+import org.objectweb.fractal.julia.control.content.SuperControllerNotifier;
+import org.objectweb.fractal.juliak.control.superc.SuperControllerDef;
+
+
+/**
+ * This class contains helper methods to facilitate the use of the Fractal
API.
+ *
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+public class FractalHelper {
+
+ public static Object getFcInterface( Component c, String itfName ) {
+ try {
+ return c.getFcInterface(itfName);
+ }
+ catch( NoSuchInterfaceException nsie ) {
+ throw new RuntimeException("No such interface:
"+nsie.getMessage());
+ }
+ }
+
+ /**
+ * Returns the {@link AttributeController} interface of the given
component.
+ *
+ * @param c a component.
+ * @return the {@link AttributeController} interface of the given
component.
+ */
+ public static AttributeController getAttributeController(Component c) {
+ return (AttributeController)
getFcInterface(c,"attribute-controller");
+ }
+
+ /**
+ * Returns the {@link BindingController} interface of the given
component.
+ *
+ * @param c a component.
+ * @return the {@link BindingController} interface of the given
component.
+ */
+ public static BindingController getBindingController(Component c) {
+ return (BindingController) getFcInterface(c,"binding-controller");
+ }
+
+ /**
+ * Returns the {@link ContentController} interface of the