http://dassault-aviation.com/externalcomm:stopServices
service allow to stop an array of serviceshttp://dassault-aviation.com/externalcomm:startServices
service allow to start an array of services<services> <namespace uri="http://dassault-aviation.com/externalcomm"> <event name="startServices"> <data name="services" type="serviceArray" /> </event> <event name="stopServices"> <data name="services" type="serviceArray" /> </event> </namespace> </services>And the associated types[1]
serviceID
uses a switch type to be able to use both a String or a NamespaceKey for a service identification<types> <namespace uri="http://dassault-aviation.com/externalcomm"> <simpleType name="string" baseType="string" /> <objectType name="namespaceKey" class="org.da.protoframework.model.namespace.NamespaceKey" /> <switchType name="serviceID" types="string namespaceKey" /> <arrayType name="serviceArray" type="serviceID" /> </namespace> </types>The
http://dassault-aviation.com/externalcomm:stopServices
service and http://dassault-aviation.com/externalcomm:startServices
service must be declared for the externalComm module. For example, for the External Communication tutorial applications declaration:<applications> <application name="eventAppli"> <deployment> <lib url="samplesEvents.jar" /> </deployment> <modules> <module name="EventModule"> <implementation path="org.da.samples.protoframework.event.EventModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventSend service="event"/> <subscribe service="published" /> </interfaces> </module> </modules> </application> <application name="externalCommEvent"> <deployment> <lib url="externalComm.jar" /> </deployment> <modules> <module name="externalComm"> <interfaces> <eventReceived service="event"/> <push service="published"/> <eventReceived service="stopServices"/> <eventReceived service="startServices"/> </interfaces> </module> </modules> </application> </applications>We must also add these two services declarations:
<services> <event name="event" id="1" > <data name="event" type="bool" /> </event> <publish name="published" id="2" > <data name="value" type="int" /> </publish> <namespace uri="http://dassault-aviation.com/externalcomm"> <event name="startServices"> <data name="services" type="serviceArray" /> </event> <event name="stopServices"> <data name="services" type="serviceArray" /> </event> </namespace> </services>and the types declarations:
<types> <simpleType name="bool" baseType="boolean" /> <simpleType name="int" baseType="int" /> <namespace uri="http://dassault-aviation.com/externalcomm"> <simpleType name="string" baseType="string" /> <objectType name="namespaceKey" class="org.da.protoframework.model.namespace.NamespaceKey" /> <switchType name="serviceID" types="string namespaceKey" /> <arrayType name="serviceArray" type="serviceID" /> </namespace> </types>
http://dassault-aviation.com/externalcomm:stopServices
service allow to stop an array of services. For example, if you want to stop the published
service:ServiceInstance service = module.getService("http://dassault-aviation.com/externalcomm", "stopServices", false); List array = new ArrayList(); array.add("published"); service.setDataValue("services", array); service.invoke();
http://dassault-aviation.com/externalcomm:startServices
service allow to stop an array of services. For example, if you want to start the published
service:ServiceInstance service = module.getService("http://dassault-aviation.com/externalcomm", "startServices", false); List array = new ArrayList(); array.add("published"); service.setDataValue("services", array); service.invoke();
http://dassault-aviation.com/externalcomm:startServices
or http://dassault-aviation.com/externalcomm:stopServices
array is a service for which the externalComm application is a provider (received from the Network) or a subscriber (sent to the network).Application externalCommPublish, Module: externalComm$1: No Service with key toto, impossible to stop ServiceIt is possible to set the module to be silent in this case and not emit any error by setting the
checkStartStopURI
property value to false
.serviceID
uses a switch type to be able to use both a String or a NamespaceKey for a service identificationCopyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence