Class ServiceInfoFactory

    • 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
      • createServiceProperties

        protected 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
      • createServiceName

        protected 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
      • createDefaultServiceName

        protected 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
      • createServiceTypeID

        protected IServiceTypeID createServiceTypeID​(EndpointDescription endpointDescription,
                                                     IDiscoveryAdvertiser advertiser)
        Parameters:
        endpointDescription - endpoint description
        advertiser - advertiser
        Returns:
        IServiceTypeID created service type ID
        Since:
        3.0