PublishModule module increments or decrements a value cyclicallyEventModule module allows to click on a toggle to set if the first module should increment or decrement the value, and shows the valueEventModule module at the configuration level. We will have as a result two GUIs which will allow to set if the first module should increment or decrement the value, and shows the value.
services or types configuration of the first tutorial, but we will duplicate the EventModule in the applications configuration. We will have two modules in the eventAppli application: And two applications:EventModule1EventModule2EventModule in the first tutorial:
PublishModule invokes cyclically the published Service, both EventModule1 and EventModule2 will be notified (and will show the value of the counter)EventModule1 and EventModule2 modules can set the incrementation or decrementation of the counterapplications.xml XML file has to be modified. The code is not impacted.
applications.xml XML file, by duplicating the previous EventModule configuration:<application name="eventAppli" id="1"> <deployment> <lib url="samples1Event.jar" /> </deployment> <modules> <module name="EventModule1" id="1" > <implementation path="org.da.samples.protoframework.event.EventModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventSend service="event" attach="attach"/> <subscribe service="published" /> </interfaces> </module> </modules> <modules> <module name="EventModule2" id="2" > <implementation path="org.da.samples.protoframework.event.EventModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventSend service="event" attach="attach"/> <subscribe service="published" /> </interfaces> </module> </modules> </application>Everything else will remain identical.
filelist2.xml file for our configuration:
java -jar protoframework.jar config=filelist2.xml
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence