Commit 7fd9949b authored by Lionel Seinturier's avatar Lionel Seinturier

Taking advantage of interfaces now defined in the Juliac ULTRA_COMP mode.

Removing closed items in the TODO list.
Copyright year and owner update.
parent 9f3630e3
extension/scala/mixins
* provide missing Julia traits not used in Tinfi and check that Julia
conformance tests pass
mixins/
* provide a scaOsgiPrimitive membrane which mixes the controllers (property,
intent) from the scaPrimitive membrane (suggested by Philippe)
module/opt-comp/
* support interceptors on control interfaces
module/opt-oo/
* check the way callback references should be working with SCA 1.1 since
@Conversational is no longer part of the API
......
......@@ -27,12 +27,12 @@ import java.lang.reflect.Modifier;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
import org.objectweb.fractal.juliac.ucf.UnifiedMethod;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator;
/**
* This class generates the source code of lifecycle interceptors.
......@@ -70,14 +70,14 @@ extends org.objectweb.fractal.juliac.opt.comp.LifeCycleSourceCodeGenerator {
@Override
public void generateFields( ClassSourceCodeVisitor cv, UnifiedClass proxycl ) {
cv.visitField(
Modifier.PRIVATE, SCAExtendedLifeCycleCoordinator.class.getName(),
Modifier.PRIVATE, ExtendedLifeCycleCoordinator.class.getName(),
"_lc", null );
}
@Override
public void generateMethodInitFcController( BlockSourceCodeVisitor mv, UnifiedClass proxycl ) {
mv.visitSet(
"_lc","(",SCAExtendedLifeCycleCoordinator.class.getName(),")",
"_lc","(",ExtendedLifeCycleCoordinator.class.getName(),")",
"ic.getInterface(\"lifecycle-controller\")");
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti Tinfi -->
<!-- Copyright (C) 2011 INRIA, USTL -->
<!-- Copyright (C) 2011-2012 Inria, Univ. Lille 1 -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti Tinfi -->
<!-- Copyright (C) 2010-2011 INRIA, USTL -->
<!-- Copyright (C) 2011-2012 Inria, Univ. Lille 1 -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
......@@ -39,7 +39,7 @@
<interface.java interface="org.objectweb.fractal.api.control.BindingController" />
</service>
<service name="//lifecycle-controller" promote="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</service>
<service name="//name-controller" promote="NC///name-controller" >
<interface.java interface="org.objectweb.fractal.api.control.NameController" />
......@@ -100,7 +100,7 @@
<interface.java interface="org.objectweb.fractal.julia.control.content.SuperControllerNotifier" />
</reference>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<reference name="///sca-content-controller" target="SCACC////sca-content-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.content.SCAExtendedContentController" />
......@@ -110,7 +110,7 @@
<component name="LC">
<service name="//lifecycle-controller">
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</service>
<reference name="//component" target="Comp///component" >
<interface.java interface="org.objectweb.fractal.api.Component" />
......@@ -155,7 +155,7 @@
<interface.java interface="org.objectweb.fractal.koch.control.interceptor.InterceptorController" />
</service>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<reference name="///sca-content-controller" target="SCACC////sca-content-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.content.SCAExtendedContentController" />
......@@ -200,7 +200,7 @@
<interface.java interface="org.objectweb.fractal.api.Component" />
</reference>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<implementation.java class="org.ow2.frascati.tinfi.control.intent.SCAPrimitiveIntentControllerImpl" />
</component>
......@@ -226,7 +226,7 @@
<interface.java interface="org.objectweb.fractal.api.Component" />
</reference>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<reference name="//sca-component-controller" target="SCACompCtx///sca-component-controller" >
<interface.java interface="org.oasisopen.sca.ComponentContext" />
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti Tinfi -->
<!-- Copyright (C) 2011 INRIA, USTL -->
<!-- Copyright (C) 2011-2012 Inria, Univ. Lille 1 -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti Tinfi -->
<!-- Copyright (C) 2010-2011 INRIA, USTL -->
<!-- Copyright (C) 2010-2012 Inria, Univ. Lille 1 -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
......@@ -39,7 +39,7 @@
<interface.java interface="org.objectweb.fractal.api.control.BindingController" />
</service>
<service name="//lifecycle-controller" promote="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</service>
<service name="//name-controller" promote="NC///name-controller" >
<interface.java interface="org.objectweb.fractal.api.control.NameController" />
......@@ -97,7 +97,7 @@
<interface.java interface="org.objectweb.fractal.julia.control.content.SuperControllerNotifier" />
</reference>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<reference name="///sca-content-controller" target="SCACC////sca-content-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.content.SCAExtendedContentController" />
......@@ -107,7 +107,7 @@
<component name="LC">
<service name="//lifecycle-controller">
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</service>
<reference name="//component" target="Comp///component" >
<interface.java interface="org.objectweb.fractal.api.Component" />
......@@ -139,7 +139,7 @@
<interface.java interface="org.objectweb.fractal.koch.control.interceptor.InterceptorController" />
</service>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<reference name="///sca-content-controller" target="SCACC////sca-content-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.content.SCAExtendedContentController" />
......@@ -184,7 +184,7 @@
<interface.java interface="org.objectweb.fractal.api.Component" />
</reference>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<implementation.java class="org.ow2.frascati.tinfi.control.intent.SCAPrimitiveIntentControllerImpl" />
</component>
......@@ -210,7 +210,7 @@
<interface.java interface="org.objectweb.fractal.api.Component" />
</reference>
<reference name="//lifecycle-controller" target="LC///lifecycle-controller" >
<interface.java interface="org.ow2.frascati.tinfi.control.lifecycle.SCAExtendedLifeCycleCoordinator" />
<interface.java interface="org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator" />
</reference>
<reference name="//sca-component-controller" target="SCACompCtx///sca-component-controller" >
<interface.java interface="org.oasisopen.sca.ComponentContext" />
......
......@@ -29,6 +29,7 @@ import org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator
import org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorTrait
import org.objectweb.fractal.julia.control.lifecycle.OptimizedLifeCycleControllerTrait
import org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleControllerTrait
import org.objectweb.fractal.juliac.control.lifecycle.ExtendedLifeCycleCoordinator
/**
* Trait implementing the {@link LifeCycleCoordinator} control interface for
......@@ -43,4 +44,4 @@ with BasicLifeCycleCoordinatorTrait
// with SyncBasicLifeCycleControllerTrait
with BasicLifeCycleControllerTrait
with TypeLifeCycleControllerTrait with SCALifeCycleTrait
with SCAExtendedLifeCycleCoordinator
with ExtendedLifeCycleCoordinator
......@@ -29,6 +29,19 @@
<artifactId>koch-runtime</artifactId>
<version>${koch.version}</version>
</dependency>
<!-- ============================================================ -->
<!-- We do not need stricto sensus this dependency here. -->
<!-- Yet we define it as a facility for all modules which depends -->
<!-- from this one and which needs it. Furthermore, this is the -->
<!-- logic of this module to shield other Tinfi ones from Juliac -->
<!-- modules. -->
<!-- ============================================================ -->
<dependency>
<groupId>org.ow2.fractal.juliac</groupId>
<artifactId>juliac-runtime-ultra-comp</artifactId>
<version>${juliac.version}</version>
</dependency>
</dependencies>
......
/***
* OW2 FraSCAti Tinfi
* Copyright (C) 2011-2012 Inria, Univ. Lille 1
*
* 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: frascati@ow2.org
*
* Author: Lionel Seinturier
* Contributor: Philippe Merle
*/
package org.ow2.frascati.tinfi.control.lifecycle;
/**
* Interface for enumerating invocations on an operation.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 1.4.5
*/
public interface InvocationCounterItf {
public void incrementFcInvocationCounter();
public void decrementFcInvocationCounter();
}
/***
* OW2 FraSCAti Tinfi
* Copyright (C) 2011-2012 Inria, Univ. Lille 1
*
* 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: frascati@ow2.org
*
* Author: Lionel Seinturier
* Contributor: Philippe Merle
*/
package org.ow2.frascati.tinfi.control.lifecycle;
import org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator;
/**
* <p>
* Interface implemented by the SCA lifecycle controller for scaPrimitive
* components in the COMP mode.
* </p>
*
* <p>
* This interface extends the Julia one with methods to manage the number of
* received invocations. These methods exist in the implementation and are
* public but are not exposed in an interface. We are introducing this interface
* in order to be able to invoke these methods from an interceptor. The purpose
* is to avoid having to deal with the controller implementation class in the
* interceptor.
* </p>
*
* <p>
* This interface is only used in the COMP mode and should then be defined in a
* runtime module specific for this mode. Since this is for the moment the only
* concerned type, I keep it here for a while.
* </p>
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 1.4.5
*/
public interface SCAExtendedLifeCycleCoordinator
extends LifeCycleCoordinator, InvocationCounterItf {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment