Commit c3ec12c1 authored by Romain Rouvoy's avatar Romain Rouvoy

Renaming the basic JNA example.

parent 2ce431d4
/**
/***
* OW2 FraSCAti Examples: HelloWorld with JNA
* Copyright (C) 2010 INRIA, University of Lille 1
*
......@@ -18,7 +18,7 @@
*
* Author: Romain Rouvoy
*
* Contributor(s): Philippe Merle
* Contributor(s):
*
*/
package jna.hw;
......@@ -31,14 +31,12 @@ import org.osoa.sca.annotations.Reference;
*
* @Author <a href="romain.rouvoy@lifl.fr">Romain Rouvoy</a>
*/
public class Client
implements Runnable
{
public class Client implements Runnable {
@Reference
private Service service ;
public final void run()
{
public void run() {
service.printf("Hello, World!\n");
}
}
}
\ No newline at end of file
/**
/***
* OW2 FraSCAti Examples: HelloWorld with JNA
* Copyright (C) 2010 INRIA, University of Lille 1
*
......@@ -30,9 +30,8 @@ import com.sun.jna.Library;
*
* @Author <a href="romain.rouvoy@lifl.fr">Romain Rouvoy</a>
*/
public interface Service
extends Library
{
public interface Service extends Library {
/**
* Reflection of the method printf() provided by the library stdio.h
*/
......
/**
/***
* OW2 FraSCAti Examples: HelloWorld JNA
* Copyright (C) 2010 INRIA, University of Lille 1
*
......@@ -32,12 +32,10 @@ import org.ow2.frascati.examples.test.FraSCAtiTestCase;
* Test the HelloWorld JNA composite.
*
*/
public class HelloWorldJNATestCase
extends FraSCAtiTestCase
{
public class HelloWorldJNATestCase extends FraSCAtiTestCase {
@Override
public final String getComposite()
{
public String getComposite() {
String composite ="helloworld-jna";
String osName = System.getProperty("os.name");
......@@ -49,9 +47,8 @@ public class HelloWorldJNATestCase
}
@Test
public final void testService()
{
public void testService() {
getService(Runnable.class, "r").run();
}
}
......@@ -42,7 +42,7 @@
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<name>OW2 FraSCAti: JNA Examples</name>
<name>OW2 FraSCAti: SCA Examples Native</name>
<properties>
<logging.conf.file>../../logging.properties</logging.conf.file>
......@@ -54,6 +54,7 @@
<modules>
<module>helloworld-jna</module>
<module>helloworld-native</module>
</modules>
<!-- ============ -->
......@@ -61,13 +62,13 @@
<!-- ============ -->
<dependencies>
<dependency>
<groupId>org.ow2.frascati.native</groupId>
<artifactId>frascati-binding-jna</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.frascati.examples.test</groupId>
<artifactId>frascati-test</artifactId>
......
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