Commit 6cdca433 authored by legoc's avatar legoc

Adapted console to new API version

parent 11be7145
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<dependency> <dependency>
<groupId>fr.ill.ics</groupId> <groupId>fr.ill.ics</groupId>
<artifactId>cameo-api</artifactId> <artifactId>cameo-api</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<dependency> <dependency>
<groupId>fr.ill.ics</groupId> <groupId>fr.ill.ics</groupId>
<artifactId>cameo-api</artifactId> <artifactId>cameo-api</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>fr.ill.ics</groupId> <groupId>fr.ill.ics</groupId>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<dependency> <dependency>
<groupId>fr.ill.ics</groupId> <groupId>fr.ill.ics</groupId>
<artifactId>cameo-api</artifactId> <artifactId>cameo-api</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
</dependencies> </dependencies>
</profile> </profile>
......
...@@ -43,7 +43,7 @@ public class RequesterClient { ...@@ -43,7 +43,7 @@ public class RequesterClient {
try { try {
// Connect to the server. // Connect to the server.
Application.Instance responderServer = server.connect("responder-server"); Application.Instance responderServer = server.connect("responder-server");
System.out.println("Application " + responderServer + " has state " + Application.State.toString(responderServer.now())); System.out.println("Application " + responderServer + " has state " + Application.State.toString(responderServer.getActualState()));
// Create a requester. // Create a requester.
Application.Requester requester = Application.Requester.create(responderServer, "responder"); Application.Requester requester = Application.Requester.create(responderServer, "responder");
......
...@@ -54,7 +54,7 @@ public class SubscriberApplication { ...@@ -54,7 +54,7 @@ public class SubscriberApplication {
try { try {
// Connect to the publisher application. // Connect to the publisher application.
Application.Instance publisherApp = server.connect("publisher-app"); Application.Instance publisherApp = server.connect("publisher-app");
System.out.println("Application " + publisherApp + " has state " + Application.State.toString(publisherApp.now())); System.out.println("Application " + publisherApp + " has state " + Application.State.toString(publisherApp.getActualState()));
// Create a subscriber to the publisher named "publisher". // Create a subscriber to the publisher named "publisher".
Application.Subscriber subscriber = Application.Subscriber.create(publisherApp, "publisher"); Application.Subscriber subscriber = Application.Subscriber.create(publisherApp, "publisher");
......
...@@ -163,7 +163,7 @@ public class TestCancelApplication { ...@@ -163,7 +163,7 @@ public class TestCancelApplication {
} }
} }
System.out.println("subscriber end of stream " + subscriber.hasEnded()); System.out.println("subscriber end of stream " + subscriber.isEnded());
int state = pubLoopApplication.waitFor(); int state = pubLoopApplication.waitFor();
......
...@@ -72,7 +72,7 @@ public class TestNonSyncSubscriberApplication { ...@@ -72,7 +72,7 @@ public class TestNonSyncSubscriberApplication {
} }
} }
System.out.println("finished stream, suspended ? " + subscriber.hasEnded()); System.out.println("finished stream, suspended ? " + subscriber.isEnded());
} catch (ConnectionTimeout e) { } catch (ConnectionTimeout e) {
System.out.println("connection timeout"); System.out.println("connection timeout");
......
...@@ -61,13 +61,13 @@ public class TestRequesterAndResponderApplication { ...@@ -61,13 +61,13 @@ public class TestRequesterAndResponderApplication {
// Start the application. // Start the application.
Application.Instance responderApplication = server.start(applicationName); Application.Instance responderApplication = server.start(applicationName);
System.out.println("started application " + responderApplication + " with state " + Application.State.toString(responderApplication.now())); System.out.println("started application " + responderApplication + " with state " + Application.State.toString(responderApplication.getActualState()));
Application.Requester requester = Application.Requester.create(responderApplication, "responder"); Application.Requester requester = Application.Requester.create(responderApplication, "responder");
System.out.println("created requester " + requester); System.out.println("created requester " + requester);
// Check the state of the responder app. // Check the state of the responder app.
System.out.println("application " + responderApplication + " has state " + Application.State.toString(responderApplication.now())); System.out.println("application " + responderApplication + " has state " + Application.State.toString(responderApplication.getActualState()));
// Send a simple message. // Send a simple message.
requester.send("request"); requester.send("request");
......
...@@ -78,7 +78,7 @@ public class TestSubscriberAndPublisherApplication { ...@@ -78,7 +78,7 @@ public class TestSubscriberAndPublisherApplication {
} }
} }
System.out.println("finished stream, stream ? " + !subscriber.hasEnded()); System.out.println("finished stream, stream ? " + !subscriber.isEnded());
// wait for the application. // wait for the application.
int state = publisherApplication.waitFor(); int state = publisherApplication.waitFor();
......
...@@ -75,7 +75,7 @@ public class TestSubscriberAndPublisherTwoApplication { ...@@ -75,7 +75,7 @@ public class TestSubscriberAndPublisherTwoApplication {
} }
} }
System.out.println("finished stream, stream ? " + !subscriber.hasEnded()); System.out.println("finished stream, stream ? " + !subscriber.isEnded());
// wait for the application. // wait for the application.
int state = publisherApplication.waitFor(); int state = publisherApplication.waitFor();
......
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