Commit ca5af82e authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Tagging version 2.2.6.1.

parent f891260d
<?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@lifl.fr
*
* Author: Lionel Seinturier
-->
<definition name="org.objectweb.fractal.aokell.dream.lib.control.logger.LoggerControllerType">
<interface
name="//logger-controller"
signature="org.objectweb.fractal.aokell.dream.lib.control.Logger.LoggerControllerItf"
role="server"
/>
</definition>
<?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@lifl.fr
*
* Author: Lionel Seinturier
-->
<definition
name="org.objectweb.fractal.aokell.lib.membrane.primitive.Primitive"
extends="org.objectweb.fractal.aokell.lib.control.logger.LoggerControllerType,org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleControllerType,org.objectweb.fractal.aokell.lib.control.binding.BindingControllerType,org.objectweb.fractal.aokell.lib.control.component.ComponentControllerType,org.objectweb.fractal.aokell.lib.control.name.NameControllerType,org.objectweb.fractal.aokell.lib.control.superc.SuperControllerType,org.objectweb.fractal.aokell.lib.control.membrane.MembraneControllerType" >
<component name="LogC"
definition="org.objectweb.fractal.aokell.lib.control.logger.LoggerController" />
<component name="Comp"
definition="org.objectweb.fractal.aokell.lib.control.component.NonCompositeComponentController" />
<component name="NC"
definition="org.objectweb.fractal.aokell.lib.control.name.NameController" />
<component name="LC"
definition="org.objectweb.fractal.aokell.lib.control.lifecycle.NonCompositeLifeCycleController" />
<component name="BC"
definition="org.objectweb.fractal.aokell.lib.control.binding.PrimitiveBindingController" />
<component name="SC"
definition="org.objectweb.fractal.aokell.lib.control.superc.SuperController" />
<component name="MC"
definition="org.objectweb.fractal.aokell.lib.control.membrane.MembraneController" />
<binding client="this.//component" server="Comp.//component" />
<binding client="this.//name-controller" server="NC.//name-controller" />
<binding client="this.//lifecycle-controller" server="LC.//lifecycle-controller" />
<binding client="this.//binding-controller" server="BC.//binding-controller" />
<binding client="this.//super-controller" server="SC.//super-controller" />
<binding client="this.///membrane-controller" server="MC.///membrane-controller" />
<binding client="Comp.//binding-controller" server="BC.//binding-controller" />
<binding client="BC.//component" server="Comp.//component" />
<binding client="BC.//super-controller" server="SC.//super-controller" />
<binding client="BC.//name-controller" server="NC.//name-controller" />
<binding client="LC.//binding-controller" server="BC.//binding-controller" />
<binding client="LC.//component" server="Comp.//component" />
<controller desc="mComposite" />
</definition>
<!--
! 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
-->
<project name="example" default="help">
<!-- Directory definitions -->
<property name="src" value="${basedir}/src"/>
<property name="build" value="${basedir}/build"/>
<property name="generated" value="${basedir}/generated"/>
<property file="${basedir}/etc/build.properties"/>
<property file="${basedir}/etc/execute.properties"/>
<!-- Building of a path which contains external jars -->
<fileset id="jars" dir="${basedir}/../..">
<include name="lib/**/*.jar" />
<include name="externals/**/*.jar" />
</fileset>
<path id="classpath">
<pathelement location="${build}"/>
<fileset refid="jars" />
</path>
<!-- ================================== -->
<!-- COMPILE -->
<!-- ================================== -->
<target name="compile" description="Compile the example">
<mkdir dir="${build}"/>
<!-- Compile the original code -->
<javac destdir="${build}">
<src path="${src}" />
<classpath refid="classpath" />
</javac>
<!-- Apply transformations or generations needed by features -->
<ant antfile="fcinterface.xml" inheritrefs="true" inheritall="true" />
<ant antfile="glue.xml" inheritrefs="true" inheritall="true" />
<ant antfile="platform.xml" inheritrefs="true" inheritall="true" />
<!-- Copy the .fractal and .jpg files to the build directory -->
<copy toDir="${build}" preservelastmodified="yes">
<fileset dir="${src}" includes="**/*.fractal" />
<fileset dir="${src}" includes="**/*.jpg" />
</copy>
</target>
<!-- ================================== -->
<!-- HELP -->
<!-- ================================== -->
<target name="help" description="Display the help message">
<loadfile property="helpMessage" srcFile="README.txt" />
<echo message="${helpMessage}" />
</target>
<!-- ================================== -->
<!-- CLEAN -->
<!-- ================================== -->
<target name="clean" description="Clean the example">
<delete dir="${build}"/>
<delete dir="${generated}"/>
</target>
</project>
This example shows how to program a simple Fractal application
with AOKell for the J2ME CLDC configuration.
This example requires the KVM which can be downloaded on the Sun
site at: http://java.sun.com/javame/downloads/index.html
To execute the example type:
ant compile
preverify.sh (.bat on Windows)
kvm.sh (.bat on Windows)
The available Ant targets are:
compile: compile the example
help: display this help message
clean: clean the generated files
When run, the example creates the following architecture:
- 1 root composite component
- 2 primitive components included in the root composite
|--------------------------------------|
| |
| |--------| |--------| |
|-|-|--->|-| Client |-|--->|-| Server | |
| |--------| |--------| |
| |
|--------------------------------------|
The server owns an interface with a method for displaying a message
and an attribute controller exporting two attributes:
- header: text to be printed before the message
- count: how many time the message must be printed
When run, the program displays the following messages:
CLIENT created
SERVER created
Server: begin printing...
->hello world
Server: print done.
# JVM arguments
run.jvm.parameters -Dfractal.provider=org.objectweb.fractal.aokell.AOKell
# Java class to be launched
run.classname hw.kvm.Main
# Application arguments
run.parameters
# Java interfaces used as Fractal interfaces
# This property is only needed when compile-time generation of Fractal
# interfaces is used (fcinterface set to ct)
fcinterface.ct.parameters java.lang.Runnable hw.kvm.ServiceAttributes hw.kvm.Service
hw.kvm.ClientImpl hw.kvm.Main hw.kvm.ServerImpl hw.kvm.Service hw.kvm.ServiceAttributes aokell.generated.hw.kvm.ServiceAttributesBoundableInterface aokell.generated.hw.kvm.ServiceAttributesImplementedInterface aokell.generated.hw.kvm.ServiceBoundableInterface aokell.generated.hw.kvm.ServiceImplementedInterface aokell.generated.java.lang.RunnableBoundableInterface aokell.generated.java.lang.RunnableImplementedInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerItfBoundableInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerItfImplementedInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.component.ComponentItfBoundableInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.component.ComponentItfImplementedInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.content.ContentControllerItfBoundableInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.content.ContentControllerItfImplementedInterface aokell.generated.org.objectweb.fractal.api.factory.FactoryBoundableInterface aokell.generated.org.objectweb.fractal.api.factory.FactoryImplementedInterface aokell.generated.org.objectweb.fractal.julia.factory.TemplateBoundableInterface aokell.generated.org.objectweb.fractal.julia.factory.TemplateImplementedInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleCoordinatorItfBoundableInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleCoordinatorItfImplementedInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.name.NameControllerItfBoundableInterface aokell.generated.org.objectweb.fractal.aokell.lib.control.name.NameControllerItfImplementedInterface aokell.generated.org.objectweb.fractal.julia.control.content.SuperControllerNotifierBoundableInterface aokell.generated.org.objectweb.fractal.julia.control.content.SuperControllerNotifierImplementedInterface aokell.generated.org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinatorBoundableInterface aokell.generated.org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinatorImplementedInterface aokell.generated.org.objectweb.fractal.api.control.BindingControllerBoundableInterface aokell.generated.org.objectweb.fractal.api.control.BindingControllerImplementedInterface aokell.generated.org.objectweb.fractal.api.factory.GenericFactoryBoundableInterface aokell.generated.org.objectweb.fractal.api.factory.GenericFactoryImplementedInterface aokell.generated.org.objectweb.fractal.api.type.TypeFactoryBoundableInterface aokell.generated.org.objectweb.fractal.api.type.TypeFactoryImplementedInterface org.objectweb.fractal.aokell.AOKell org.objectweb.fractal.aokell.AOKellMembranes org.objectweb.fractal.aokell.BasicMembranes org.objectweb.fractal.aokell.component.BootstrapComponentImpl org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerCloneableItf org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerImpl org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerItf$1 org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerItf org.objectweb.fractal.aokell.lib.control.binding.AbstractBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.BindingControllerDef$1 org.objectweb.fractal.aokell.lib.control.binding.BindingControllerDef org.objectweb.fractal.aokell.lib.control.binding.CompositeAutoBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.CompositeBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.CompositeTemplateBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.FlatBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.FlatTemplateBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.PrimitiveAutoBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.PrimitiveBindingControllerImpl org.objectweb.fractal.aokell.lib.control.binding.PrimitiveTemplateBindingControllerImpl org.objectweb.fractal.aokell.lib.control.CloneCtrlException org.objectweb.fractal.aokell.lib.control.component.ComponentDescItf org.objectweb.fractal.aokell.lib.control.component.ComponentImpl org.objectweb.fractal.aokell.lib.control.component.ComponentItf$1 org.objectweb.fractal.aokell.lib.control.component.ComponentItf org.objectweb.fractal.aokell.lib.control.component.ComponentSetterItf org.objectweb.fractal.aokell.lib.control.component.CompositeComponentImpl org.objectweb.fractal.aokell.lib.control.content.ContentControllerImpl org.objectweb.fractal.aokell.lib.control.content.ContentControllerItf$1 org.objectweb.fractal.aokell.lib.control.content.ContentControllerItf org.objectweb.fractal.aokell.lib.control.content.TemplateContentControllerImpl org.objectweb.fractal.aokell.lib.control.Controller org.objectweb.fractal.api.factory.Factory org.objectweb.fractal.julia.factory.Template org.objectweb.fractal.aokell.lib.control.factory.FactoryControllerImpl org.objectweb.fractal.aokell.lib.control.factory.FactoryDef$1 org.objectweb.fractal.aokell.lib.control.factory.FactoryDef org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator org.objectweb.fractal.aokell.lib.control.lifecycle.CompositeLifeCycleControllerImpl org.objectweb.fractal.aokell.lib.control.lifecycle.InvocationCounter org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleControllerDef org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleControllerDef$1 org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleCoordinatorItf org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleInterceptorItf org.objectweb.fractal.aokell.lib.control.lifecycle.LifeCycleControllerImpl org.objectweb.fractal.aokell.lib.control.name.NameControllerImpl org.objectweb.fractal.aokell.lib.control.name.NameControllerItf$1 org.objectweb.fractal.aokell.lib.control.name.NameControllerItf org.objectweb.fractal.julia.control.content.SuperControllerNotifier org.objectweb.fractal.aokell.lib.control.superc.SuperControllerImpl org.objectweb.fractal.aokell.lib.control.superc.SuperControllerDef$1 org.objectweb.fractal.aokell.lib.control.superc.SuperControllerDef org.objectweb.fractal.aokell.lib.factory.GenericFactoryImpl org.objectweb.fractal.aokell.lib.factory.MembraneFactoryImpl org.objectweb.fractal.aokell.lib.factory.MembraneFactoryItf org.objectweb.fractal.aokell.lib.factory.TypeFactoryImpl org.objectweb.fractal.aokell.lib.interf.AOKellGeneratedItf org.objectweb.fractal.aokell.lib.interf.ClassDefinition org.objectweb.fractal.aokell.lib.interf.CompositeExtItfManager org.objectweb.fractal.aokell.lib.interf.CompositeIntItfManager org.objectweb.fractal.aokell.lib.interf.Delegator org.objectweb.fractal.aokell.lib.interf.FcItfImplHelper org.objectweb.fractal.aokell.lib.interf.InterfaceManager org.objectweb.fractal.aokell.lib.interf.PrimitiveExtItfManager org.objectweb.fractal.julia.ComponentInterface org.objectweb.fractal.aokell.lib.ComponentInterfaceImpl org.objectweb.fractal.aokell.lib.InterfaceImpl org.objectweb.fractal.aokell.lib.membrane.composite.CompositeTemplateType org.objectweb.fractal.aokell.lib.membrane.composite.CompositeType org.objectweb.fractal.aokell.lib.membrane.composite.ParametricCompositeTemplateType org.objectweb.fractal.aokell.lib.membrane.composite.ParametricCompositeType org.objectweb.fractal.aokell.lib.membrane.ControllerDef org.objectweb.fractal.aokell.lib.membrane.flat.FlatTemplateType org.objectweb.fractal.aokell.lib.membrane.flat.FlatType org.objectweb.fractal.aokell.lib.membrane.flat.ParametricFlatTemplateType org.objectweb.fractal.aokell.lib.membrane.flat.ParametricFlatType org.objectweb.fractal.aokell.lib.membrane.marker.BaseType org.objectweb.fractal.aokell.lib.membrane.marker.BindingType org.objectweb.fractal.aokell.lib.membrane.marker.ContentType org.objectweb.fractal.aokell.lib.membrane.marker.LifeCycleInterceptorType org.objectweb.fractal.aokell.lib.membrane.marker.LifeCycleType org.objectweb.fractal.aokell.lib.membrane.marker.NameType org.objectweb.fractal.aokell.lib.membrane.marker.ParametricType org.objectweb.fractal.aokell.lib.membrane.marker.SuperType org.objectweb.fractal.aokell.lib.membrane.marker.TemplateType org.objectweb.fractal.aokell.lib.membrane.MembraneDef org.objectweb.fractal.aokell.lib.membrane.primitive.ParametricPrimitiveTemplateType org.objectweb.fractal.aokell.lib.membrane.primitive.ParametricPrimitiveType org.objectweb.fractal.aokell.lib.membrane.primitive.PrimitiveTemplateType org.objectweb.fractal.aokell.lib.membrane.primitive.PrimitiveType org.objectweb.fractal.aokell.lib.type.ComponentTypeImpl org.objectweb.fractal.aokell.lib.type.InterfaceTypeImpl org.objectweb.fractal.aokell.lib.util.FractalHelper org.objectweb.fractal.aokell.lib.util.LoggableHelper org.objectweb.fractal.aokell.lib.util.MembraneHelper org.objectweb.fractal.aokell.lib.util.PlatformHelper org.objectweb.fractal.aokell.Membranes org.objectweb.fractal.api.Component org.objectweb.fractal.api.control.AttributeController org.objectweb.fractal.api.control.BindingController org.objectweb.fractal.api.control.ContentController org.objectweb.fractal.api.control.IllegalBindingException org.objectweb.fractal.api.control.IllegalContentException org.objectweb.fractal.api.control.IllegalLifeCycleException org.objectweb.fractal.api.control.LifeCycleController org.objectweb.fractal.api.control.NameController org.objectweb.fractal.api.control.SuperController org.objectweb.fractal.api.factory.Factory org.objectweb.fractal.api.factory.GenericFactory org.objectweb.fractal.api.factory.InstantiationException org.objectweb.fractal.api.Fractal org.objectweb.fractal.api.Interface org.objectweb.fractal.api.NoSuchInterfaceException org.objectweb.fractal.api.type.ComponentType org.objectweb.fractal.api.type.InterfaceType org.objectweb.fractal.api.type.TypeFactory org.objectweb.fractal.api.Type org.objectweb.fractal.util.BindingControllerHelper org.objectweb.fractal.util.ComponentHelper org.objectweb.fractal.util.ContentControllerHelper org.objectweb.fractal.util.Fractal spoon.jdiet.java14.cldc.rt.Helper spoon.jdiet.java14.cldc.rt.MapEntryImpl
\ No newline at end of file
kvm.exe -classpath build4kvm hw.kvm.Main
\ No newline at end of file
kvm -classpath build4kvm hw.kvm.Main
\ No newline at end of file
preverify.exe -d build4kvm -classpath build;..\..\externals\cldc-1.1.jar;..\..\externals\fractal.jar;..\..\externals\jdiet-rt-20060719.jar;..\..\lib\aokell-lib-2.0.jar;..\..\lib\aokell-component-2.0.jar;..\..\lib\julia-api.jar;..\..\externals\fractal-util-j2me.jar @files.lst
\ No newline at end of file
preverify -d build4kvm -classpath build:../../externals/cldc-1.1.jar:../../externals/fractal.jar:../../externals/jdiet-rt-20060719.jar:../../lib/aokell-lib-2.0.jar:../../lib/aokell-component-2.0.jar:../../lib/julia-api.jar:../../lib/fractal-util.jar @files.lst
\ No newline at end of file
/***
* Fractal Hello World Example
* Copyright (C) 2001-2002 France Telecom R&D
*
* 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: Eric.Bruneton@rd.francetelecom.com
* Contact: Lionel.Seinturier@lifl.fr
*
* Author: Eric Bruneton
* Author: Lionel Seinturier
*/
package hw.kvm;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.api.control.BindingController;
public class ClientImpl implements Runnable {
public ClientImpl () {
System.err.println("CLIENT created");
}
public void run () {
Service service = null;
try {
service = (Service) ((BindingController)this).lookupFc("s");
}
catch( NoSuchInterfaceException nsie ) {
throw new RuntimeException(nsie.getMessage());
}
service.print("hello world");
}
}
Supports Markdown
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