org.eclipse.ecf.osgi.services.remoteserviceadmin
Class ServiceInfoFactory

java.lang.Object
  extended by org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
      extended by org.eclipse.ecf.osgi.services.remoteserviceadmin.ServiceInfoFactory
All Implemented Interfaces:
IServiceInfoFactory

public class ServiceInfoFactory
extends AbstractMetadataFactory
implements IServiceInfoFactory

Default implementation of IServiceInfoFactory.


Field Summary
 
Fields inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
LIST_SEPARATOR
 
Constructor Summary
ServiceInfoFactory()
           
 
Method Summary
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)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceInfoFactory

public ServiceInfoFactory()
Method Detail

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 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, null will be returned.
Since:
3.0

createServiceInfo

protected IServiceInfo createServiceInfo(java.net.URI uri,
                                         java.lang.String serviceName,
                                         IServiceTypeID serviceTypeID,
                                         IServiceProperties serviceProperties)

createServiceProperties

protected IServiceProperties createServiceProperties(EndpointDescription endpointDescription,
                                                     IDiscoveryAdvertiser advertiser,
                                                     IServiceTypeID serviceTypeID,
                                                     java.lang.String serviceName,
                                                     java.net.URI uri)
Since:
3.0

createURI

protected java.net.URI createURI(EndpointDescription endpointDescription,
                                 IDiscoveryAdvertiser advertiser,
                                 IServiceTypeID serviceTypeID,
                                 java.lang.String serviceName)
                          throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException
Since:
3.0

createServiceName

protected java.lang.String createServiceName(EndpointDescription endpointDescription,
                                             IDiscoveryAdvertiser advertiser,
                                             IServiceTypeID serviceTypeID)
Since:
3.0

createDefaultServiceName

protected java.lang.String createDefaultServiceName(EndpointDescription endpointDescription,
                                                    IDiscoveryAdvertiser advertiser,
                                                    IServiceTypeID serviceTypeID)
Since:
3.0

createServiceTypeID

protected IServiceTypeID createServiceTypeID(EndpointDescription endpointDescription,
                                             IDiscoveryAdvertiser advertiser)
Since:
3.0