org.eclipse.ecf.osgi.services.remoteserviceadmin
Interface IEndpointDescriptionAdvertiser

All Known Implementing Classes:
EndpointDescriptionAdvertiser

public interface IEndpointDescriptionAdvertiser

Endpoint description advertiser service. TopologyManager consumers may use this service to advertise/publish endpoint descriptions for discovery. Typically, implementations of this service will use the ECF Discovery API to advertise/publish EndpointDescriptions over the network. For example, this is what EndpointDescriptionAdvertiser does...i.e. it advertises/unadvertises endpoint descriptions by calling and/all available instances of IDiscoveryAdvertiser.registerService(org.eclipse.ecf.discovery.IServiceInfo) .

Note, however, that other implementations of endpoint description advertisers are possible that do not use ECF Discovery...or use ECF Discovery in other ways. For example, some TopologyManagers may wish to advertise exported remote services by creating a static xml file describing the endpoint by using the Endpoint Description Extender Format (EDEF) described in section 122.8 of the OSGi Enterprise Specification by calling advertise(EndpointDescription) on their own implementation of this service that uses an EndpointDescriptionWriter to create an EDEF bundle.

If no other instances of this service have been registered, a default instance of EndpointDescriptionAdvertiser will be used. The default instance uses ECF IDiscoveryAdvertisers to publish the endpoint description. Note that the default instance is registered with the lowest possible priority, so that if other IEndpointDescriptionAdvertiser instances are registered, they will be preferred/used over the default.


Method Summary
 org.eclipse.core.runtime.IStatus advertise(EndpointDescription endpointDescription)
          Advertise/publish the given endpoint description.
 org.eclipse.core.runtime.IStatus unadvertise(EndpointDescription endpointDescription)
          Unadvertise/unpublishe the given endpoint description.
 

Method Detail

advertise

org.eclipse.core.runtime.IStatus advertise(EndpointDescription endpointDescription)
Advertise/publish the given endpoint description.

Parameters:
endpointDescription - the endpoint description to advertise. Must not be null.
Returns:
IStatus to indicate the status of the advertisement. If the returned status returns false from IStatus.isOK(), then the advertisement failed. The IStatus can be further inspected for exception information and/or child statuses.
See Also:
IStatus

unadvertise

org.eclipse.core.runtime.IStatus unadvertise(EndpointDescription endpointDescription)
Unadvertise/unpublishe the given endpoint description.

Parameters:
endpointDescription - the endpoint description to unadvertise. Must not be null.
Returns:
IStatus to indicate the status of the unadvertisement. If the returned status returns false from IStatus.isOK(), then the unadvertisement failed. The IStatus can be further inspected for exception information and/or child statuses.
See Also:
IStatus