public class ServiceInfoFactory extends AbstractMetadataFactory implements IServiceInfoFactory
IServiceInfoFactory
.LIST_SEPARATOR
Constructor and Description |
---|
ServiceInfoFactory() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.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(java.net.URI uri,
java.lang.String serviceName,
IServiceTypeID serviceTypeID,
IServiceProperties serviceProperties) |
protected java.lang.String |
createServiceName(EndpointDescription endpointDescription,
IDiscoveryAdvertiser advertiser,
IServiceTypeID serviceTypeID) |
protected IServiceProperties |
createServiceProperties(EndpointDescription endpointDescription,
IDiscoveryAdvertiser advertiser,
IServiceTypeID serviceTypeID,
java.lang.String serviceName,
java.net.URI uri) |
protected IServiceTypeID |
createServiceTypeID(EndpointDescription endpointDescription,
IDiscoveryAdvertiser advertiser) |
protected java.net.URI |
createURI(EndpointDescription endpointDescription,
IDiscoveryAdvertiser advertiser,
IServiceTypeID serviceTypeID,
java.lang.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(java.net.URI uri, java.lang.String serviceName, IServiceTypeID serviceTypeID, IServiceProperties serviceProperties)
protected IServiceProperties createServiceProperties(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, java.lang.String serviceName, java.net.URI uri)
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDserviceName
- serviceNameuri
- uriprotected java.net.URI createURI(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, java.lang.String serviceName) throws java.net.URISyntaxException
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDserviceName
- service namejava.net.URISyntaxException
- thrown if URI cannot be createdprotected java.lang.String createServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID)
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDprotected java.lang.String createDefaultServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID)
endpointDescription
- endpoint descriptionadvertiser
- advertiserserviceTypeID
- serviceTypeIDprotected IServiceTypeID createServiceTypeID(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser)
endpointDescription
- endpoint descriptionadvertiser
- advertiser