Jump to: navigation, search

Difference between revisions of "File-based Discovery"

(New page: ECF 3.1 makes available a contribution from Siemens, called File-Based Discovery. The ECF Discovery API, (TBD))
 
Line 1: Line 1:
ECF 3.1 makes available a contribution from Siemens, called File-Based Discovery.  The ECF Discovery API, (TBD)
+
ECF 3.1 makes available a contribution from Siemens, called File-Based Discovery.  File-based discovery allows those using the ECF RFC119 implementation to trigger remote service discovery by publishing remote service interfaces and their associated endpoints in a service description xml file.
 +
 
 +
The three pieces of information to describe a remote service with the ECF remote services endpoint are
 +
 
 +
# The service interface (i.e. the fully-qualified classname of the service interface class. Example:  '''org.eclipse.ecf.examples.remoteservices.hello.IHello'''
 +
# The service publication 'connect id' (aka URI of endpoint).  Example (ECF generic provider):  '''ecftcp://localhost:3282/server'''
 +
# The service publication 'connect namespace'.  Example (ECF generic provider): '''org.eclipse.ecf.core.identity.StringID'''
 +
 
 +
<pre>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
  <service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
 +
    <service-description>
 +
      <provide
 +
interface="org.eclipse.ecf.examples.remoteservices.hello.IHello"/>
 +
      <property
 +
name="ecf.sp.cid">ecftcp://localhost:3282/server</property>
 +
      <property name="ecf.sp.cns">org.eclipse.ecf.core.identity.StringID</property>
 +
  </service-description>
 +
</service-descriptions>
 +
</pre>
 +
 
 +
Here, for another example, is a service description file that publishes the same service interface '''org.eclipse.ecf.examples.remoteservices.hello.IHello''' with an ECF service publication connect id (ecf.sp.cid) of '''r-osgi://localhost:9278''' and an ECF service publication connect namespace (ecf.sp.cns) of '''ecf.namespace.r_osgi'''.
 +
 
 +
<pre>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
  <service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
 +
    <service-description>
 +
      <provide
 +
interface="org.eclipse.ecf.examples.remoteservices.hello.IHello"/>
 +
      <property
 +
name="ecf.sp.cid">r-osgi://localhost:9278</property>
 +
      <property name="ecf.sp.cns">ecf.namespace.r_osgi</property>
 +
  </service-description>
 +
</service-descriptions>
 +
</pre>

Revision as of 21:11, 12 October 2009

ECF 3.1 makes available a contribution from Siemens, called File-Based Discovery. File-based discovery allows those using the ECF RFC119 implementation to trigger remote service discovery by publishing remote service interfaces and their associated endpoints in a service description xml file.

The three pieces of information to describe a remote service with the ECF remote services endpoint are

  1. The service interface (i.e. the fully-qualified classname of the service interface class. Example: org.eclipse.ecf.examples.remoteservices.hello.IHello
  2. The service publication 'connect id' (aka URI of endpoint). Example (ECF generic provider): ecftcp://localhost:3282/server
  3. The service publication 'connect namespace'. Example (ECF generic provider): org.eclipse.ecf.core.identity.StringID
<?xml version="1.0" encoding="UTF-8"?>
  <service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
    <service-description>
      <provide
interface="org.eclipse.ecf.examples.remoteservices.hello.IHello"/>
      <property
name="ecf.sp.cid">ecftcp://localhost:3282/server</property>
      <property name="ecf.sp.cns">org.eclipse.ecf.core.identity.StringID</property>
   </service-description>
</service-descriptions>

Here, for another example, is a service description file that publishes the same service interface org.eclipse.ecf.examples.remoteservices.hello.IHello with an ECF service publication connect id (ecf.sp.cid) of r-osgi://localhost:9278 and an ECF service publication connect namespace (ecf.sp.cns) of ecf.namespace.r_osgi.

<?xml version="1.0" encoding="UTF-8"?>
  <service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
    <service-description>
      <provide
interface="org.eclipse.ecf.examples.remoteservices.hello.IHello"/>
      <property
name="ecf.sp.cid">r-osgi://localhost:9278</property>
      <property name="ecf.sp.cns">ecf.namespace.r_osgi</property>
   </service-description>
</service-descriptions>