Class EndpointDescriptionLocator

    • Constructor Detail

      • EndpointDescriptionLocator

        public EndpointDescriptionLocator​(BundleContext context)
    • Method Detail

      • start

        public void start()
      • close

        public void close()
      • loadProperties

        protected EDEFProperties loadProperties​(URL url)
                                         throws IOException
        Load EDEF properties from given url. Provided url must not be null.
        Parameters:
        url - the URL to load the properties from.
        Returns:
        EDEFProperties instance. Will not be null.
        Throws:
        IOException - if properties cannot be read via EDEFProperties.load(InputStream)
        Since:
        4.8
      • loadAndProcessProperties

        protected Map<String,​Object> loadAndProcessProperties​(Map<String,​Object> props,
                                                                    URL url)
        Load and then process properties (merge with given props).
        Parameters:
        props - the props to merge with. Should not be null.
        url - the URL to load properties from via loadProperties(URL). May be null.
        Returns:
        properties loaded and merged with provided props. Returns props unmodified if url is null or load exception.
        Since:
        4.8
      • getPropsURL

        protected URL getPropsURL​(URL url,
                                  String newPath)
        Get props url starting with given url with newPath rather than existing path.
        Parameters:
        url - the based URL to start with. Uses proptocol, host, port. Must not be null.
        newPath - new path to use with given url to create and return new url. Must not be null.
        Returns:
        url created from given url with newPath. Will be null if MalformedURLException thrown.
        Since:
        4.8
      • findOverrideProperties

        protected Map<String,​Object> findOverrideProperties​(Bundle bundle,
                                                                  URL edFileRUL)
        Find all override properties for given bundle at given fileURL. Will load edef_defaults.properties files and edef_defaults-[value of system property: org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator.localPropertiesFile].properties.
        Parameters:
        bundle - the bundle responsible for the given fileURL. Must not be null.
        edFileURL - the file URL to load properties file(s) from. Must not be null.
        Returns:
        Map containing all properties to override those in xml from edFileURL paths and edFileURL file name with .properties suffix.
        Since:
        4.7
      • findProperties

        protected Map<String,​Object> findProperties​(Bundle bundle,
                                                          URL edFileURL)
        Find all override properties for given bundle at given fileURL. Will load edef_defaults.properties files and edef_defaults-[value of system property: org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator.localPropertiesFile].properties.
        Parameters:
        bundle - the bundle responsible for the given fileURL. Must not be null.
        edFileURL - the file URL to load properties file(s) from. Must not be null.
        Returns:
        Map containing all properties to override those in xml from edFileURL paths and edFileURL file name with .properties suffix.
        Since:
        4.8
      • discoverEndpoint

        public void discoverEndpoint​(EndpointDescription endpointDescription)
        Description copied from interface: IEndpointDescriptionLocator
        Discover the given endpointDescription. This method will not block and will result in local EndpointEventListeners to be notified that the given endpointDescription is discovered. about
        Specified by:
        discoverEndpoint in interface IEndpointDescriptionLocator
        Parameters:
        endpointDescription - must not be null
        Since:
        4.3
      • updateEndpoint

        public void updateEndpoint​(EndpointDescription endpointDescription)
        Description copied from interface: IEndpointDescriptionLocator
        Update the given endpointDescription. This method will not block and will result in local EndpointEventListeners to be notified that the given endpointDescription is updated. about
        Specified by:
        updateEndpoint in interface IEndpointDescriptionLocator
        Parameters:
        endpointDescription - must not be null
        Since:
        4.3
      • undiscoverEndpoint

        public void undiscoverEndpoint​(EndpointDescription endpointDescription)
        Description copied from interface: IEndpointDescriptionLocator
        Remove the given endpointDescription. This method will not block and will result in local EndpointEventListeners to be notified that the given endpointDescription is removed. about
        Specified by:
        undiscoverEndpoint in interface IEndpointDescriptionLocator
        Parameters:
        endpointDescription - must not be null
        Since:
        4.3