# # Copyright (c) 2015-2024 Linagora # # This program/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.1 of the License, or (at your # option) any later version. # # This program/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 program/library; If not, see http://www.gnu.org/licenses/ # for the GNU Lesser General Public License version 2.1. # ################################################################################## # # This is a redefinition of some of the Fractal membranes ############ Composite with Interceptors (SharedArea Composite) ################# ## Copied as-is and renomed from julia-bundled.cfg's lifecycle-controller-impl ### Needed because fraclet-bundled.cfg overrides lifecycle-controller-impl (needed by primitive) #### and we need the normal one for compositewithinterceptors (lifecycle-controller-impl-no-fraclet ((org.objectweb.fractal.julia.asm.MixinClassGenerator LifeCycleControllerNoFracletImpl 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 )) ) ## Copied, modified and renamed from julia-bundled.cfg's composite ### This defines a composite with interceptors that blocks calls when the component #### is stopped instead of stopping client interfaces ### It is only used for the SharedArea composite (compositewithinterceptors ( '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 ## THIS HAS BEEN CHANGED (from composite-lifecycle-controller-impl) 'lifecycle-controller-impl-no-fraclet 'name-controller-impl ) ( ## THIS HAS BEEN ADDED (from nothing) (org.objectweb.fractal.juliac.core.proxy.InterceptorClassGenerator org.objectweb.fractal.juliac.core.proxy.LifeCycleSourceCodeGenerator ) ) org.objectweb.fractal.julia.asm.MergeClassGenerator 'optimizationLevel ) ) ############ Components without Lifecycle Checks and improved Fraclet collection interfaces ################# ## Copied and modified from julia-bundled.cfg (overrides it) ### This is needed (with the override of container-binding-controller-impl below) #### to not check lifecycle state when removing components from a composite ### It is used mainly for the Container composite, TODO maybe we could define a membrane only for it?! (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: ### BOTH LINES ARE COMMENTED TO DISABLE IT ### ### This one is for checking constraints when removing subcomponents ### It is needed to remove BC,SE,SU,SA lifecycles and co from Container composite #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 )) ) ## Copied and modified from fraclet-bundled.cfg (overrides it as well as julia-bundled.cfg definition) ### This is needed (with the override of content-controller-impl above) #### to not check lifecycle state when removing component's binding from a primitive #### (it is used mainly for the ContainerServiceImpl primitive, TODO maybe we could define a membrane only for it?!) ### It also add an optional mixin to have simpler key names in collection interfaces in fraclet annotated classes #### (it is used mainly by ContainerServiceImpl and RouterServiceImpl (container-binding-controller-impl ((org.objectweb.fractal.julia.asm.MixinClassGenerator ContainerBindingControllerImpl org.objectweb.fractal.julia.BasicControllerMixin org.objectweb.fractal.julia.control.binding.ContainerBindingControllerMixin org.objectweb.fractal.juliac.fraclet.control.binding.FracletBindingControllerMixin ### WE ADDED THAT LINE org.objectweb.fractal.juliac.fraclet.control.binding.FracletBindingControllerMixinSimpleCollectionKeys # 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: ### BOTH LINES ARE COMMENTED TO DISABLE IT ### ### It is needed to remove bindings of BC,SE,SU,SA lifecycles and co from ContainerServiceImpl! #org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin #org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin )) )