Commit 205f8642 authored by Munilla Christophe's avatar Munilla Christophe

helloworld-upnp is directly added to the binding-upnp-test module

parent f4b4c706
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: HelloWorld UPnP
*
* Copyright (c) 2009-2011 INRIA, University of 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: Rémi Mélisson
*
* Contributor(s):
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>helloworld-upnp-client</artifactId>
<packaging>jar</packaging>
<name>OW2 FraSCAti Examples: HelloWorld UPnP Client</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>helloworld-upnp-parent</artifactId>
<version>1.5-SNAPSHOT</version>
</parent>
<properties>
<composite.file>helloworld-upnp-client</composite.file>
<service.name>r</service.name>
<method.name>run</method.name>
</properties>
</project>
\ No newline at end of file
/**
* OW2 FraSCAti Examples: HelloWorld UPnP client
* Copyright (C) 2010 INRIA, University of 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
*
* Author: Rmi Mlisson
*
* Contributor(s):
*
*/
package org.ow2.frascati.examples.helloworld.upnp;
import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Service;
/**
* A print service client.
*/
@Service(Runnable.class)
public class Client
implements Runnable
{
@Reference(name = "printService")
private PrintService s;
/**
* Default constructor.
*/
public Client()
{
System.out.println("CLIENT created.");
}
/**
* Run the client.
*/
public final void run()
{
s.print("Hello World!");
}
}
/**
* OW2 FraSCAti Examples: HelloWorld UPnP
* Copyright (C) 2010 INRIA, University of 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
*
* Author: RŽmi MŽlisson
*
* Contributor(s):
*
*/
package org.ow2.frascati.examples.helloworld.upnp;
import org.osoa.sca.annotations.Service;
@Service
public interface PrintService
{
void print(String msg);
}
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti Examples: HelloWorld UPnP Client -->
<!-- Copyright (C) 2010 INRIA, University of 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: Rémi Mélisson -->
<!-- -->
<!-- Contributor(s): -->
<composite
xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:upnp="http://frascati.ow2.org/xmlns/upnp/1.0"
targetNamespace="http://frascati.ow2.org/helloworld-upnp-client"
name="helloworld-controlpoint">
<service name="r" promote="client/r">
<interface.java interface="java.lang.Runnable" />
</service>
<component name="client">
<service name="r">
<interface.java interface="java.lang.Runnable" />
</service>
<reference name="printService">
<upnp:binding.upnp />
<interface.java interface="org.ow2.frascati.examples.helloworld.upnp.PrintService" />
</reference>
<implementation.java class="org.ow2.frascati.examples.helloworld.upnp.Client" />
</component>
</composite>
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Helloworld UPnP
*
* Copyright (c) 2009-2011 INRIA, University of 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: Rémi Mélisson
*
* Contributor(s):
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>helloworld-upnp-parent</artifactId>
<packaging>pom</packaging>
<name>OW2 FraSCAti Examples: HelloWorld UPnP</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>parent</artifactId>
<version>1.5-SNAPSHOT</version>
</parent>
<properties>
<config.directory>../..</config.directory>
</properties>
<dependencies>
<!-- OW2 FraSCAti Java UPnP Binding. -->
<dependency>
<groupId>org.ow2.frascati.upnp</groupId>
<artifactId>frascati-binding-upnp</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<modules>
<module>client</module>
<module>server</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djava.net.preferIPv4Stack=true</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: HelloWorld UPnP
*
* Copyright (c) 2009-2011 INRIA, University of 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: Rémi Mélisson
*
* Contributor(s):
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>helloworld-upnp-server</artifactId>
<packaging>jar</packaging>
<name>OW2 FraSCAti Examples: HelloWorld UPnP Server</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>helloworld-upnp-parent</artifactId>
<version>1.5-SNAPSHOT</version>
</parent>
<properties>
<composite.file>helloworld-upnp-server</composite.file>
</properties>
<dependencies>
<!-- OW2 FraSCAti Java UPnP Binding. -->
<!--
<dependency>
<groupId>org.ow2.frascati.upnp</groupId>
<artifactId>frascati-binding-upnp</artifactId>
<version>${project.version}</version>
</dependency>
-->
</dependencies>
</project>
/**
* OW2 FraSCAti Examples: HelloWorld UPnP
* Copyright (C) 2010 INRIA, University of 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
*
* Author: RŽmi MŽlisson
*
* Contributor(s):
*
*/
package org.ow2.frascati.examples.helloworld.upnp;
import org.osoa.sca.annotations.Service;
public interface PrintService
{
void print(String msg);
}
/**
* OW2 FraSCAti Examples: HelloWorld UPnP
* Copyright (C) 2010 INRIA, University of 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
*
* Author: RŽmi MŽlisson
*
* Contributor(s):
*
*/
package org.ow2.frascati.examples.helloworld.upnp;
import org.osoa.sca.annotations.Scope;
/**
* The print service implementation.
*/
@Scope("COMPOSITE")
public class Server
implements PrintService
{
//@Property
private String header = "->";
private int count = 1;
/**
* Default constructor.
*/
public Server()
{
System.out.println("SERVER created.");
}
/**
* PrintService implementation.
*/
public final void print(final String msg)
{
System.out.println("SERVER: begin printing...");
for (int i = 0; i < count; ++i) {
System.out.println(header + msg);
}
System.out.println("SERVER: print done.");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti Examples: HelloWorld UPnP -->
<!-- Copyright (C) 2010 INRIA, University of 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: Rémi Mélisson -->
<!-- -->
<!-- Contributor(s): -->
<composite
xmlns="http://www.osoa.org/xmlns/sca/1.0"
name="helloworld-device" >
<!-- targetNamespace="http://frascati.ow2.org/helloworld-upnp/" -->
<service name="s" promote="server/s">
<interface.java interface="org.ow2.frascati.examples.helloworld.upnp.PrintService"/>
</service>
<component name="server" xmlns:upnp="http://frascati.ow2.org/xmlns/upnp/1.0" >
<implementation.java class="org.ow2.frascati.examples.helloworld.upnp.Server"/>
<service name="s">
<interface.java interface="org.ow2.frascati.examples.helloworld.upnp.PrintService"/>
<upnp:binding.upnp />
</service>
</component>
</composite>
\ No newline at end of file
......@@ -46,6 +46,7 @@
</properties>
<modules>
<module>helloworld-upnp</module>
<module>framework</module>
<module>felix</module>
<!-- test are made using Apache Felix -->
......
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