Class ServiceInfoFactory
- java.lang.Object
- 
- org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
- 
- org.eclipse.ecf.osgi.services.remoteserviceadmin.ServiceInfoFactory
 
 
- 
- All Implemented Interfaces:
- IServiceInfoFactory
 
 public class ServiceInfoFactory extends AbstractMetadataFactory implements IServiceInfoFactory Default implementation ofIServiceInfoFactory.
- 
- 
Field Summary- 
Fields inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactoryLIST_SEPARATOR
 
- 
 - 
Constructor SummaryConstructors Constructor Description ServiceInfoFactory()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcreateDefaultServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID)protected IServiceInfocreateServiceInfo(URI uri, String serviceName, IServiceTypeID serviceTypeID, IServiceProperties serviceProperties)IServiceInfocreateServiceInfo(IDiscoveryAdvertiser advertiser, EndpointDescription endpointDescription)Create an service info instance to represent the given endpointDescription for discovery using the given discovery advertiser.protected StringcreateServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID)protected IServicePropertiescreateServiceProperties(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName, URI uri)protected IServiceTypeIDcreateServiceTypeID(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser)protected URIcreateURI(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName)- 
Methods inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactoryclose, decodeEndpointDescription, decodeList, decodeLong, decodeNonStandardServiceProperties, decodeOSGiProperties, decodeString, encodeList, encodeLong, encodeNonStandardServiceProperties, encodeOSGiServiceProperties, encodeServiceProperties, encodeString, logError, logWarning
 
- 
 
- 
- 
- 
Method Detail- 
createServiceInfopublic IServiceInfo createServiceInfo(IDiscoveryAdvertiser advertiser, EndpointDescription endpointDescription) Description copied from interface:IServiceInfoFactoryCreate an service info instance to represent the given endpointDescription for discovery using the given discovery advertiser.- Specified by:
- createServiceInfoin interface- IServiceInfoFactory
- Parameters:
- 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.
- 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,nullwill be returned.
- Since:
- 3.0
 
 - 
createServiceInfoprotected IServiceInfo createServiceInfo(URI uri, String serviceName, IServiceTypeID serviceTypeID, IServiceProperties serviceProperties) 
 - 
createServicePropertiesprotected IServiceProperties createServiceProperties(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName, URI uri) - Parameters:
- endpointDescription- endpoint description
- advertiser- advertiser
- serviceTypeID- serviceTypeID
- serviceName- serviceName
- uri- uri
- Returns:
- IServiceProperties for the given input parameters
- Since:
- 3.0
 
 - 
createURIprotected URI createURI(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName) throws URISyntaxException - Parameters:
- endpointDescription- endpoint description
- advertiser- advertiser
- serviceTypeID- serviceTypeID
- serviceName- service name
- Returns:
- URI created
- Throws:
- URISyntaxException- thrown if URI cannot be created
- Since:
- 3.0
 
 - 
createServiceNameprotected String createServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID) - Parameters:
- endpointDescription- endpoint description
- advertiser- advertiser
- serviceTypeID- serviceTypeID
- Returns:
- String created service name for input parameters
- Since:
- 3.0
 
 - 
createDefaultServiceNameprotected String createDefaultServiceName(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID) - Parameters:
- endpointDescription- endpoint description
- advertiser- advertiser
- serviceTypeID- serviceTypeID
- Returns:
- String default service name created
- Since:
- 3.0
 
 - 
createServiceTypeIDprotected IServiceTypeID createServiceTypeID(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser) - Parameters:
- endpointDescription- endpoint description
- advertiser- advertiser
- Returns:
- IServiceTypeID created service type ID
- Since:
- 3.0
 
 
- 
 
-