org.eclipse.ecf.osgi.services.discovery
Interface ServicePublication

All Known Subinterfaces:
RemoteServicePublication

Deprecated. This interface is deprecated because at the time of ECF 3.0/Galileo release, it seems likely that this class will be moved, or renamed, or undergo major changes after the release of ECF 3.0. This deprecation is therefore intended as a notice to consumers about these upcoming changes in the RFC119 specification, and the consequent changes to these OSGi-defined classes.

public interface ServicePublication

Register a service implementing the ServicePublication interface in order to publish metadata of a particular service (endpoint) via Discovery. Metadata which has to be published is given in form of properties at registration.

In order to update published service metadata, update the properties registered with the ServicePublication service. Depending on Discovery's implementation and underlying protocol it may result in an update or new re-publication of the service.

In order to unpublish the previously published service metadata, unregister the ServicePublication service.

Please note that providing the SERVICE_INTERFACE_NAME property is mandatory when a ServicePublication service is registered. Note also that a Discovery implementation may require provision of additional properties, e.g. some of the standard properties defined below, or may make special use of them in case they are provided. For example an SLP-based Discovery might use the value provided with the ENDPOINT_LOCATION property for construction of a SLP-URL used to publish the service.

Also important is that it's not guaranteed that after registering a ServicePublication object its service metadata is actually published. Beside the fact that at least one Discovery service has to be present, the provided properties have to be valid, e.g. shouldn't contain case variants of the same key name, and the actual publication via Discovery mechanisms has to succeed.

Version:
$Revision: 1.2 $

Field Summary
static java.lang.String ENDPOINT_ID
          Deprecated. Optional property of the published service uniquely identifying its endpoint.
static java.lang.String ENDPOINT_INTERFACE_NAME
          Deprecated. Optional ServiceRegistration property which contains a collection of interface names with their associated (non-Java) endpoint interface names separated by SEPARATOR e.g.:
["my.company.foo|MyWebService", "my.company.zoo|MyWebService"].
static java.lang.String ENDPOINT_LOCATION
          Deprecated. Optional property of the published service identifying its location.
static java.lang.String SEPARATOR
          Deprecated. Separator constant for association of interface-specific values with the particular interface name.
static java.lang.String SERVICE_INTERFACE_NAME
          Deprecated. Mandatory ServiceRegistration property which contains a collection of full qualified interface names offered by the advertised service endpoint.
static java.lang.String SERVICE_INTERFACE_VERSION
          Deprecated. Optional ServiceRegistration property which contains a collection of interface names with their associated version attributes separated by SEPARATOR e.g.
static java.lang.String SERVICE_PROPERTIES
          Deprecated. Optional ServiceRegistration property which contains a map of properties of the published service.
 
Method Summary
 org.osgi.framework.ServiceReference getReference()
          Deprecated. Returns the ServiceReference this publication metadata is associated with.
 

Field Detail

SERVICE_INTERFACE_NAME

static final java.lang.String SERVICE_INTERFACE_NAME
Deprecated. 
Mandatory ServiceRegistration property which contains a collection of full qualified interface names offered by the advertised service endpoint.

Value of this property is of type Collection (<String>).

See Also:
Constant Field Values

SERVICE_INTERFACE_VERSION

static final java.lang.String SERVICE_INTERFACE_VERSION
Deprecated. 
Optional ServiceRegistration property which contains a collection of interface names with their associated version attributes separated by SEPARATOR e.g. ["my.company.foo|1.3.5", "my.company.zoo|2.3.5"]. In case no version has been provided for an interface, Discovery may use the String-value of org.osgi.framework.Version.emptyVersion constant.

Value of this property is of type Collection (<String>), may be null or empty.

See Also:
Constant Field Values

ENDPOINT_INTERFACE_NAME

static final java.lang.String ENDPOINT_INTERFACE_NAME
Deprecated. 
Optional ServiceRegistration property which contains a collection of interface names with their associated (non-Java) endpoint interface names separated by SEPARATOR e.g.:
["my.company.foo|MyWebService", "my.company.zoo|MyWebService"].

This (non-Java) endpoint interface name is usually a communication protocol specific interface, for instance a web service interface name. Though this information is usually contained in accompanying properties e.g. a wsdl file, Discovery usually doesn't read and interprets such service meta-data. Providing this information explicitly, might allow external non-Java applications find services based on this endpoint interface.

Value of this property is of type Collection (<String>), may be null or empty.

See Also:
Constant Field Values

SERVICE_PROPERTIES

static final java.lang.String SERVICE_PROPERTIES
Deprecated. 
Optional ServiceRegistration property which contains a map of properties of the published service.

Property keys are handled in a case insensitive manner (as OSGi Framework does).

Value of this property is of type Map (String, Object), may be null or empty.

See Also:
Constant Field Values

ENDPOINT_LOCATION

static final java.lang.String ENDPOINT_LOCATION
Deprecated. 
Optional property of the published service identifying its location. This property is provided as part of the service property map referenced by the SERVICE_PROPERTIES ServiceRegistration property.

Value of this property is of type java.net.URI, may be null.

See Also:
Constant Field Values

ENDPOINT_ID

static final java.lang.String ENDPOINT_ID
Deprecated. 
Optional property of the published service uniquely identifying its endpoint. This property is provided as part of the service property map referenced by the SERVICE_PROPERTIES ServiceRegistration property.

Value of this property is of type String, may be null.

See Also:
Constant Field Values

SEPARATOR

static final java.lang.String SEPARATOR
Deprecated. 
Separator constant for association of interface-specific values with the particular interface name. See also SERVICE_INTERFACE_VERSION and ENDPOINT_INTERFACE_NAME properties which describe such interface-specific values.

See Also:
Constant Field Values
Method Detail

getReference

org.osgi.framework.ServiceReference getReference()
Deprecated. 
Returns the ServiceReference this publication metadata is associated with.

Returns:
the ServiceReference being published. Is never null.