attach
attributepublisher
module is attached as a provider for the publish
service:<applications> <application name="application"> <modules> <module name="publisher"> <interfaces> <publish service="publish" /> </interfaces> </module> <module name="subscriber"> <interfaces> <subscribe service="publish" /> </interfaces> </module> </modules> </application> </applications>
attach
attribute. For example here the publisher1
and publisher2
modules are both attached as a provider for the publish
service:<applications> <application name="application"> <modules> <module name="publisher1" > <interfaces> <push service="publish" attach="attach" /> </interfaces> </module> <module name="publisher2" > <interfaces> <push service="publish" attach="attach" /> </interfaces> </module> <module name="subscriber" > <interfaces> <subscribe service="publish" /> </interfaces> </module> </modules> </application> </applications>Note that if the framework property
autoAttachProviders
is set to true, it is not necessary to declare the attachment for each module. For example, if we have the following framework property declaration:<files> ... <property key="autoAttachProviders" value="true" /> </files>It is not necessary anymore to put any
attach
attribute for the modules interfaces.
<applications> <application name="application" id="1"> <modules> <module name="masterPublisher" id="1" > <interfaces> <push service="published" attach="attach" isMaster="true" /> </interfaces> </module> <module name="publisher2"> <interfaces> <push service="published" attach="attach" /> </interfaces> </module> <module name="subscriber"> <interfaces> <subscribe service="publish" /> </interfaces> </module> </modules> </application> </applications>The methods to attach and detach a module to / from a Service are:
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence