"monolog-conf-file"
- * initialisation parameter can be set to specify the location of the monolog
- * configuration file.
- */
-public class BasicLoggerControllerImpl
- implements LoggerControllerItf, 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 BasicLoggerControllerImpl() {
- initFcController();
- }
-
- private void initFcController() {
-
- 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 unregiser(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);
- }
-
- // --------------------------------------------------------------
- // Controller interface
- // --------------------------------------------------------------
-
- /**
- * Initialize the controller.
- *
- * @param membrane the membrane which contains the controller
- */
- public void initFcCtrl( Membrane membrane ) {
- // Indeed nothing
- }
-
- /**
- * Clone the controller state from the current component to another one.
- * This method may receive some hints on how to do this, or provide some
- * hints on how this has been done. For instance, the hints may be a map
- * that is read and/or written by the controller. The raison d'être of
- * these hints is that when its state is cloned, a controller may produce
- * results that are needed by other controllers.
- *
- * @param dst the destination component
- * @param hints hints for performing the operation
- */
- public void cloneFcCtrl( Component dst, Object hints )
- throws CloneCtrlException {
- // Indeed nothing for the component controller
- }
-}
diff --git a/aokell/doc/javadoc/examples/Controller.java b/aokell/doc/javadoc/examples/Controller.java
deleted file mode 100644
index 39d513c8e7622b5cb1acf911647bdfc656af8939..0000000000000000000000000000000000000000
--- a/aokell/doc/javadoc/examples/Controller.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/***
- * 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@lifl.fr
- *
- * Author: Lionel Seinturier
- */
-
-package org.objectweb.fractal.aokell.lib.control;
-
-import org.objectweb.fractal.api.Component;
-
-/**
- * Interface for defining a controller.
- *
- * @author Lionel Seinturier -This package contains the classes which generates the component interface -classes. The generation uses the ASM -bytecode engineering library. -
- - - diff --git a/aokell/features/fcinterface/rt/test/conform/org/objectweb/fractal/aokell/lib/asm/TestDelegator.java b/aokell/features/fcinterface/rt/test/conform/org/objectweb/fractal/aokell/lib/asm/TestDelegator.java deleted file mode 100644 index c93bfa099babb8017d67016768b25e7ec9371704..0000000000000000000000000000000000000000 --- a/aokell/features/fcinterface/rt/test/conform/org/objectweb/fractal/aokell/lib/asm/TestDelegator.java +++ /dev/null @@ -1,46 +0,0 @@ -/*** - * 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@lifl.fr - * - * Author: Lionel Seinturier - */ - -package org.objectweb.fractal.aokell.lib.asm; - -import junit.framework.TestCase; - -/** - * @author Lionel Seinturier-This package contains the AspectJ aspects which integrate the control logic into -components. There is one aspect per controller type. Each aspect is responsible -for integrating the logic of a control interface. -
- - - diff --git a/aokell/features/glue/aspectj/src/org/objectweb/fractal/aokell/tools/content/ContentResolverHelper.java b/aokell/features/glue/aspectj/src/org/objectweb/fractal/aokell/tools/content/ContentResolverHelper.java deleted file mode 100644 index 21f53e825b66e683ae8dc635e23bbad86f5d1d1b..0000000000000000000000000000000000000000 --- a/aokell/features/glue/aspectj/src/org/objectweb/fractal/aokell/tools/content/ContentResolverHelper.java +++ /dev/null @@ -1,91 +0,0 @@ -/*** - * 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@lifl.fr - * - * Author: Lionel Seinturier - */ - -package org.objectweb.fractal.aokell.tools.content; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Date; - -import org.objectweb.fractal.aokell.lib.membrane.marker.LifeCycleInterceptorType; - - -/** - * This class contains helper methods with an implementation which differs - * depending on the choosen version of the glue feature. These methods are used - * by the content resolver tool. - * - * @author Lionel Seinturier-This package contains the implementation of the Spoon version of the glue -feature. -
- - - diff --git a/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/glue/processor/CtrlItfInjectorProcessor.java b/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/glue/processor/CtrlItfInjectorProcessor.java deleted file mode 100644 index 9e86490cd2841fc8f9bdd9c5fe4a616123680420..0000000000000000000000000000000000000000 --- a/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/glue/processor/CtrlItfInjectorProcessor.java +++ /dev/null @@ -1,75 +0,0 @@ -/*** - * AOKell - * Copyright (C) 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@lifl.fr - * - * Author: Lionel Seinturier - */ - -package org.objectweb.fractal.aokell.glue.processor; - - -import org.objectweb.fractal.aokell.glue.SpoonHelper; -import org.objectweb.fractal.aokell.glue.template.BindingControllerTemplate; -import org.objectweb.fractal.aokell.glue.template.ComponentControllerTemplate; -import org.objectweb.fractal.aokell.glue.template.ContentControllerTemplate; -import org.objectweb.fractal.aokell.glue.template.LifeCycleControllerTemplate; -import org.objectweb.fractal.aokell.glue.template.NameControllerTemplate; -import org.objectweb.fractal.aokell.glue.template.SuperControllerTemplate; -import org.objectweb.fractal.aokell.glue.template.TemplateControllerTemplate; -import org.objectweb.fractal.aokell.lib.membrane.marker.BaseType; -import org.objectweb.fractal.aokell.lib.membrane.marker.BindingType; -import org.objectweb.fractal.aokell.lib.membrane.marker.ContentType; -import org.objectweb.fractal.aokell.lib.membrane.marker.LifeCycleType; -import org.objectweb.fractal.aokell.lib.membrane.marker.NameType; -import org.objectweb.fractal.aokell.lib.membrane.marker.SuperType; -import org.objectweb.fractal.aokell.lib.membrane.marker.TemplateType; - -import spoon.processing.AbstractProcessor; -import spoon.reflect.declaration.CtClass; -import spoon.template.Template; - -/** - * This processor injects control interfaces into component content classes - * based on the marker types implemented by these classes. - * - * @author Lionel Seinturier-This package contains Spoon processors for gluing controllers with component -implementations. -
- - - diff --git a/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/glue/template/BindingControllerTemplate.java b/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/glue/template/BindingControllerTemplate.java deleted file mode 100644 index bf9a153148f5c102c7805abca9f28a31a1882345..0000000000000000000000000000000000000000 --- a/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/glue/template/BindingControllerTemplate.java +++ /dev/null @@ -1,99 +0,0 @@ -/*** - * AOKell - * Copyright (C) 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@lifl.fr - * - * Author: Lionel Seinturier - */ - -package org.objectweb.fractal.aokell.glue.template; - -import org.objectweb.fractal.aokell.lib.control.component.ComponentItf; -import org.objectweb.fractal.aokell.lib.util.FractalHelper; -import org.objectweb.fractal.api.NoSuchInterfaceException; -import org.objectweb.fractal.api.control.BindingController; -import org.objectweb.fractal.api.control.IllegalBindingException; -import org.objectweb.fractal.api.control.IllegalLifeCycleException; - -import spoon.template.Local; -import spoon.template.Template; - -/** - * This template defines the elements which are introduced in all classes - * which are processed by BindingControllerProcessor. - * - * @author Lionel Seinturier-This package contains code templates used by Spoon processors. -
- - - diff --git a/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/tools/content/ContentResolverHelper.java b/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/tools/content/ContentResolverHelper.java deleted file mode 100644 index 1c031fc8d36578e94c784ece528c0948a05fc691..0000000000000000000000000000000000000000 --- a/aokell/features/glue/spoon/src/org/objectweb/fractal/aokell/tools/content/ContentResolverHelper.java +++ /dev/null @@ -1,107 +0,0 @@ -/*** - * 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@lifl.fr - * - * Author: Lionel Seinturier - */ - -package org.objectweb.fractal.aokell.tools.content; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Date; - -import org.objectweb.fractal.aokell.glue.processor.ItfImplProcessor; -import org.objectweb.fractal.aokell.lib.membrane.marker.LifeCycleInterceptorType; - - -/** - * This class contains helper methods with an implementation which differs - * depending on the choosen version of the glue feature. These methods are used - * by the content resolver tool. - * - * @author Lionel Seinturier-This package contains the definition of control membranes. -
- - - diff --git a/aokell/features/membrane/comp/src/org/objectweb/fractal/aokell/lib/membrane/primitive/AutoBindingPrimitive.fractal b/aokell/features/membrane/comp/src/org/objectweb/fractal/aokell/lib/membrane/primitive/AutoBindingPrimitive.fractal deleted file mode 100644 index ba2990175ef0c0b0737f16d3ca5e40fe336bb350..0000000000000000000000000000000000000000 --- a/aokell/features/membrane/comp/src/org/objectweb/fractal/aokell/lib/membrane/primitive/AutoBindingPrimitive.fractal +++ /dev/null @@ -1,64 +0,0 @@ - - - - - --This package contains the membrane compiler tool which is used to compile ADL -descriptions of AOKell membranes. -
- - - diff --git a/aokell/features/membrane/oo/membrane.xml b/aokell/features/membrane/oo/membrane.xml deleted file mode 100644 index a0d2a5cf95c48c1d30f91250422ee72a776882cd..0000000000000000000000000000000000000000 --- a/aokell/features/membrane/oo/membrane.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - --This package contains the definition of control membranes. -
- - - diff --git a/aokell/features/membrane/oo/src/org/objectweb/fractal/aokell/lib/util/MembraneHelper.java b/aokell/features/membrane/oo/src/org/objectweb/fractal/aokell/lib/util/MembraneHelper.java deleted file mode 100644 index 7cee512acc1f6d82aadacd37f0037ebd472faf54..0000000000000000000000000000000000000000 --- a/aokell/features/membrane/oo/src/org/objectweb/fractal/aokell/lib/util/MembraneHelper.java +++ /dev/null @@ -1,137 +0,0 @@ -/*** - * 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@lifl.fr - * - * Author: Lionel Seinturier - */ - -package org.objectweb.fractal.aokell.lib.util; - -import org.objectweb.fractal.aokell.Membranes; -import org.objectweb.fractal.aokell.lib.control.component.ComponentItf; -import org.objectweb.fractal.aokell.lib.control.content.ContentControllerItf; -import org.objectweb.fractal.aokell.lib.membrane.MembraneDef; -import org.objectweb.fractal.api.Component; -import org.objectweb.fractal.api.control.BindingController; -import org.objectweb.fractal.api.control.LifeCycleController; -import org.objectweb.fractal.julia.control.content.SuperControllerNotifier; - - - -/** - * This class contains helper methods with an implementation which differs - * depending on the choosen version of the membrane feature. - * - * @author Lionel Seinturier