Class ServiceInfoFactory
java.lang.Object
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
org.eclipse.ecf.osgi.services.remoteserviceadmin.ServiceInfoFactory
- All Implemented Interfaces:
IServiceInfoFactory
Default implementation of
IServiceInfoFactory
.-
Field Summary
Fields inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
LIST_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
createDefaultServiceName
(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID) protected IServiceInfo
createServiceInfo
(URI uri, String serviceName, IServiceTypeID serviceTypeID, IServiceProperties serviceProperties) createServiceInfo
(IDiscoveryAdvertiser advertiser, EndpointDescription endpointDescription) Create an service info instance to represent the given endpointDescription for discovery using the given discovery advertiser.protected String
createServiceName
(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID) protected IServiceProperties
createServiceProperties
(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName, URI uri) protected IServiceTypeID
createServiceTypeID
(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser) protected URI
createURI
(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName) Methods inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
close, decodeEndpointDescription, decodeList, decodeLong, decodeNonStandardServiceProperties, decodeOSGiProperties, decodeString, encodeList, encodeLong, encodeNonStandardServiceProperties, encodeOSGiServiceProperties, encodeServiceProperties, encodeString, logError, logWarning
-
Constructor Details
-
ServiceInfoFactory
public ServiceInfoFactory()
-
-
Method Details
-
createServiceInfo
public IServiceInfo createServiceInfo(IDiscoveryAdvertiser advertiser, EndpointDescription endpointDescription) Description copied from interface:IServiceInfoFactory
Create an service info instance to represent the given endpointDescription for discovery using the given discovery advertiser.- Specified by:
createServiceInfo
in interfaceIServiceInfoFactory
- Parameters:
advertiser
- the advertiser to use for creating the service info result. Must not benull
.endpointDescription
- the endpoint description that the service info is to represent. Must not benull
.- Returns:
- IServiceInfo to use to publish the endpointDescription for
discovery (via
IDiscoveryAdvertiser.registerService(IServiceInfo)
. If a service info instance has previously been created for the given endpointDescription by this service info factory, then that serviceInfo will be returned in favor of creating a new one. Otherwise, a new service info will be created and returned. If some error occurs in the creation of the serviceInfo,null
will be returned. - Since:
- 3.0
-
createServiceInfo
protected IServiceInfo createServiceInfo(URI uri, String serviceName, IServiceTypeID serviceTypeID, IServiceProperties serviceProperties) -
createServiceProperties
protected IServiceProperties createServiceProperties(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName, URI uri) - Parameters:
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDserviceName
- serviceNameuri
- uri- Returns:
- IServiceProperties for the given input parameters
- Since:
- 3.0
-
createURI
protected URI createURI(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName) throws URISyntaxException - Parameters:
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDserviceName
- service name- Returns:
- URI created
- Throws:
URISyntaxException
- thrown if URI cannot be created- Since:
- 3.0
-
createServiceName
protected String createServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID) - Parameters:
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeID- Returns:
- String created service name for input parameters
- Since:
- 3.0
-
createDefaultServiceName
protected String createDefaultServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID) - Parameters:
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeID- Returns:
- String default service name created
- Since:
- 3.0
-
createServiceTypeID
protected IServiceTypeID createServiceTypeID(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser) - Parameters:
endpointDescription
- endpoint descriptionadvertiser
- advertiser- Returns:
- IServiceTypeID created service type ID
- Since:
- 3.0
-