<applications> <application name="appli1" id="1"> ... <modules> <module name="module1" id="1" > <implementation path="..." > ... </implementation> <interfaces> <push service="service1" attach="attach"/> </interfaces> </module> <ownerModule name="module2" id="2" > <interfaces> <subscribe service="service1"/>> </interfaces> </ownerModule> </modules> </application> </applications>
public class MyOwner implements FrameworkOwner { public void subscribe(ServiceInstance service) { Data data = service.getData("data1"); int value = data.getValueAsInt(); System.out.println(value); } }
// create the Framework Owner MyOwner owner = new MyOwner(); // create the Framework Framework framework = new Framework(owner); // setup the Framework, the url points to the framework configuration framework.setup(url); // start the framework framework.start();
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence