Class ServerUpdateUtilities


  • @Service(ServerUpdateUtilities.class)
    public class ServerUpdateUtilities
    extends java.lang.Object
    Utility methods to implement the application update.
    • Constructor Detail

      • ServerUpdateUtilities

        public ServerUpdateUtilities()
    • Method Detail

      • exportUpdateService

        public void exportUpdateService​(java.lang.String serviceUrlName,
                                        java.lang.String updateUrlName,
                                        java.lang.Class<? extends UpdateService> updateServiceImplClass,
                                        java.rmi.server.RMIClientSocketFactory csf,
                                        java.rmi.server.RMIServerSocketFactory ssf)
        Creates a registry and exports the update service.

        Notice: either both csf and ssf must be given or none.

        Parameters:
        serviceUrlName - the rmi service url, ex. "rmi://localhost/Update:33002"
        updateUrlName - the URL base holding the downloads, ex. "http://localhost/myapp/downloads"
        updateServiceImplClass - the class implementing the remote UpdateService
        csf - the client socket factory, null if system default
        ssf - the server socket factory, null if system default
      • exportUpdateService

        public void exportUpdateService​(java.lang.String serviceUrlName,
                                        java.lang.String updateUrlName,
                                        java.lang.Class<? extends UpdateService> updateServiceImplClass)
        Creates a registry and exports the update service using default socket factories.
        Parameters:
        serviceUrlName - the rmi service url, ex. "rmi://localhost/Update:33002"
        updateUrlName - the URL base holding the downloads, ex. "http://localhost/myapp/downloads"
        updateServiceImplClass - the class implementing the remote UpdateService
      • createUpdateServiceImpl

        protected UpdateService createUpdateServiceImpl​(java.lang.Class<? extends UpdateService> updateServiceImplClass,
                                                        int port,
                                                        java.lang.String updateUrlName,
                                                        java.rmi.server.RMIClientSocketFactory csf,
                                                        java.rmi.server.RMIServerSocketFactory ssf)
        Parameters:
        updateServiceImplClass - the class implementing the remote UpdateService
        port - the ip port
        updateUrlName - the download base URL
        csf - the client socket factory, null if system default
        ssf - the server socket factory, null if system default
        Returns:
        the service implementation