mode
for the interfaces
declaration specifies how the interfaces from the autodescripted module will be used in the instances:interfaces
element does not exist in the instanceinterfaces
element exists in the instance<application name="publishAppli"> <modules> <module name="PublishModule" > <implementation path="org.da.samples.protoframework.publish.PublishModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventReceived service="event1"/> <eventSend service="event2"/> </interfaces> </module> </modules> </application>If the autodescripted module is defined in the
MyModule.jar
file, and we have the following applications configuration:<applications> <application name="MyAppli"> <deployment> <lib url="MyModule.jar" /> </deployment> </application> </applications>The definition is equivalent as:
<application name="MyAppli"> <deployment> ... </deployment> <modules> <module name="PublishModule$1" > <implementation path="org.da.samples.protoframework.publish.PublishModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventReceived service="event1"/> <eventSend service="event2"/> </interfaces> </module> </modules> </application>
MyModule.jar
file, and we have the following applications configuration:<applications> <application name="MyAppli"> <deployment> <lib url="MyModule.jar" /> </deployment> <modules> <module name="MyModule" > <interfaces> <subscribe service="position"/> </interfaces> </module> </modules> </application> </applications>The definition is equivalent as:
<application name="MyAppli"> <deployment> ... </deployment> <modules> <module name="MyModule" > <implementation path="org.da.samples.protoframework.publish.PublishModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <subscribe service="position"/> </interfaces> </module> </modules> </application>Note that the following interfaces specification in the autodescripted module will produce the same result:
<interfaces mode="clear"> <eventReceived service="event1"/> <eventSend service="event2"/> </interfaces>
<application name="publishAppli"> <modules> <module name="PublishModule" > <implementation path="org.da.samples.protoframework.publish.PublishModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces mode="keep"> <eventReceived service="event1"/> <eventSend service="event2"/> </interfaces> </module> </modules> </application>If the autodescripted module is defined in the
MyModule.jar
file, and we have the following applications configuration:<applications> <application name="MyAppli"> <deployment> <lib url="MyModule.jar" /> </deployment> <modules> <module name="MyModule" > <interfaces> <subscribe service="position"/> </interfaces> </module> </modules> </application> </applications>The definition is equivalent as:
<application name="MyAppli"> <deployment> ... </deployment> <modules> <module name="MyModule" > <implementation path="org.da.samples.protoframework.publish.PublishModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventReceived service="event1"/> <eventSend service="event2"/> <subscribe service="position"/> </interfaces> </module> </modules> </application>
mode
attribute at the instance level.<application name="publishAppli"> <modules> <module name="PublishModule" > <implementation path="org.da.samples.protoframework.publish.PublishModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces mode="keep"> <eventReceived service="event1"/> <eventSend service="event2"/> </interfaces> </module> </modules> </application>We are able to specify for an instance that the mode will be
clear
and not keep
with:<applications> <application name="MyAppli"> <deployment> <lib url="MyModule.jar" /> </deployment> <modules> <module name="MyModule" > <interfaces mode="keep"> <subscribe service="position"/> </interfaces> </module> </modules> </application> </applications>
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence