|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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 |
---|
static final java.lang.String SERVICE_INTERFACE_NAME
Value of this property is of type
Collection (<String>)
.
static final java.lang.String SERVICE_INTERFACE_VERSION
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.
static final java.lang.String ENDPOINT_INTERFACE_NAME
SEPARATOR
e.g.: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.
static final java.lang.String SERVICE_PROPERTIES
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.
static final java.lang.String ENDPOINT_LOCATION
SERVICE_PROPERTIES
ServiceRegistration property.
Value of this property is of type java.net.URI
, may be
null
.
static final java.lang.String ENDPOINT_ID
SERVICE_PROPERTIES
ServiceRegistration
property.
Value of this property is of type String
, may be
null
.
static final java.lang.String SEPARATOR
SERVICE_INTERFACE_VERSION
and ENDPOINT_INTERFACE_NAME
properties which describe such
interface-specific values.
Method Detail |
---|
org.osgi.framework.ServiceReference getReference()
ServiceReference
this publication metadata is
associated with.
ServiceReference
being published. Is never
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |