... | ... | @@ -71,6 +71,7 @@ public class JavaApp { |
|
|
```
|
|
|
|
|
|
It simply prints a new line every 100ms infinitely. Notice that the name "App2" is the name of the application registered in the Cameo server so that there is no link with the class name.
|
|
|
Moreover consider that the app is registered so that its standard output and error are streamed.
|
|
|
|
|
|
The application *App1* written in C++ has the following lines:
|
|
|
|
... | ... | @@ -111,3 +112,17 @@ app2.stop() |
|
|
# Wait for the end of the app and get the terminal state.
|
|
|
state = app.waitFor()
|
|
|
```
|
|
|
|
|
|
On computer *D*, the console connects to *App2* and receives some output before *App2* is stopped:
|
|
|
|
|
|
```
|
|
|
$ cmo -e tcp://B:7000 connect App2
|
|
|
Connected App2.5
|
|
|
Printing 5
|
|
|
Printing 6
|
|
|
Printing 7
|
|
|
Printing 8
|
|
|
The application App2.5 terminated successfully.
|
|
|
```
|
|
|
|
|
|
The lines starting with *Connected* and *The application* are written by the console whereas the lines starting with *Printing* come from the app itself as it was configured to stream its error and output. |