public class ServiceInfoFactory extends AbstractMetadataFactory implements IServiceInfoFactory
IServiceInfoFactory
.LIST_SEPARATOR
Constructor and Description |
---|
ServiceInfoFactory() |
Modifier and Type | Method and Description |
---|---|
protected String |
createDefaultServiceName(EndpointDescription endpointDescription,
IDiscoveryAdvertiser advertiser,
IServiceTypeID serviceTypeID) |
IServiceInfo |
createServiceInfo(IDiscoveryAdvertiser advertiser,
EndpointDescription endpointDescription)
Create an service info instance to represent the given
endpointDescription for discovery using the given discovery advertiser.
|
protected IServiceInfo |
createServiceInfo(URI uri,
String serviceName,
IServiceTypeID serviceTypeID,
IServiceProperties serviceProperties) |
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) |
close, decodeEndpointDescription, decodeList, decodeLong, decodeNonStandardServiceProperties, decodeOSGiProperties, decodeString, encodeList, encodeLong, encodeNonStandardServiceProperties, encodeOSGiServiceProperties, encodeServiceProperties, encodeString, logError, logWarning
public IServiceInfo createServiceInfo(IDiscoveryAdvertiser advertiser, EndpointDescription endpointDescription)
IServiceInfoFactory
createServiceInfo
in interface IServiceInfoFactory
advertiser
- the advertiser to use for creating the service info result.
Must not be null
.endpointDescription
- the endpoint description that the service info is to
represent. Must not be null
.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.protected IServiceInfo createServiceInfo(URI uri, String serviceName, IServiceTypeID serviceTypeID, IServiceProperties serviceProperties)
protected IServiceProperties createServiceProperties(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName, URI uri)
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDserviceName
- serviceNameuri
- uriprotected URI createURI(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName) throws URISyntaxException
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDserviceName
- service nameURISyntaxException
- thrown if URI cannot be createdprotected String createServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID)
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDprotected String createDefaultServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID)
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDprotected IServiceTypeID createServiceTypeID(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser)
endpointDescription
- endpoint descriptionadvertiser
- advertiserCopyright © 2004–2020 Eclipse Foundation. All rights reserved.