Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EIG:File-based Discovery with the Endpoint Description Extender Format"
(→Writing/Creating EDEF xml files) |
(→Example) |
||
Line 22: | Line 22: | ||
<property name="ecf.endpoint.id.ns" value-type="String" value="org.eclipse.ecf.core.identity.StringID"/> | <property name="ecf.endpoint.id.ns" value-type="String" value="org.eclipse.ecf.core.identity.StringID"/> | ||
<property name="endpoint.framework.uuid" value-type="String" value="70cd3d4b-4931-0010-1b63-d64101cefd5e"/> | <property name="endpoint.framework.uuid" value-type="String" value="70cd3d4b-4931-0010-1b63-d64101cefd5e"/> | ||
− | <property name="endpoint.id" value-type="String" value="ecftcp:// | + | <property name="endpoint.id" value-type="String" value="ecftcp://localhost:3787/server"/> |
− | <property name="endpoint. | + | <property name="endpoint.service.id" value-type="Long" value="0"/> |
− | + | <property name="endpoint.package.version.org.eclipse.ecf.examples.remoteservices.hello" value-type="String" value="3.0.0"/> | |
<property name="objectClass" value-type="String"> | <property name="objectClass" value-type="String"> | ||
<array> | <array> | ||
− | <value>org.eclipse.ecf. | + | <value>org.eclipse.ecf.examples.remoteservices.hello.IHello</value> |
</array> | </array> | ||
</property> | </property> |
Revision as of 22:54, 7 March 2011
Introduction
Starting with version 3.5, ECF supports/implements the OSGi 4.2 Remote Service Admin (RSA)...chapter 122 in the enterprise specification.
The RSA specification includes an xml-file-based discovery mechanism called the Endpoint Description Extender Format (edef). This allows remote service endpoints to be discovered statically, via xml-files that contain endpoint descriptions. These xml files, are delivered into a running framework via active bundles, as specified in section 122.8.
Example
There is an example of the use of the EDEF format here. See the Remote-Service header in the manifest:
... Remote-Service: generic_hello.xml
And here is the contents of generic_hello.xml in the EDEF format:
<?xml version="1.0" encoding="UTF-8"?> <endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0"> <endpoint-description> <property name="ecf.endpoint.id.ns" value-type="String" value="org.eclipse.ecf.core.identity.StringID"/> <property name="endpoint.framework.uuid" value-type="String" value="70cd3d4b-4931-0010-1b63-d64101cefd5e"/> <property name="endpoint.id" value-type="String" value="ecftcp://localhost:3787/server"/> <property name="endpoint.service.id" value-type="Long" value="0"/> <property name="endpoint.package.version.org.eclipse.ecf.examples.remoteservices.hello" value-type="String" value="3.0.0"/> <property name="objectClass" value-type="String"> <array> <value>org.eclipse.ecf.examples.remoteservices.hello.IHello</value> </array> </property> <property name="remote.configs.supported" value-type="String"> <array> <value>ecf.generic.server</value> </array> </property> <property name="remote.intents.supported" value-type="String"> <array> <value>passByValue</value> <value>exactlyOnce</value> <value>ordered</value> </array> </property> <property name="service.id" value-type="Long" value="64"/> <property name="service.imported" value-type="String" value="true"/> <property name="service.imported.configs" value-type="String"> <array> <value>ecf.generic.server</value> </array> </property> </endpoint-description> </endpoint-descriptions>
Writing/Creating EDEF xml files
In ECF's remote service admin implementation, an EndpointDescriptionWriter class is available to allow EndpointDescriptions to be written...to disk or some other output stream.