java.lang.Object
org.tentackle.update.ServerUpdateUtilities
Utility methods to implement the application update.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected UpdateServicecreateUpdateServiceImpl(Class<? extends UpdateService> updateServiceImplClass, int port, String updateUrlName, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Creates the update service implementation.
Invoked byexportUpdateService(String, String, Class, RMIClientSocketFactory, RMIServerSocketFactory).voidexportUpdateService(String serviceUrlName, String updateUrlName, Class<? extends UpdateService> updateServiceImplClass) Creates a registry and exports the update service using default socket factories.voidexportUpdateService(String serviceUrlName, String updateUrlName, Class<? extends UpdateService> updateServiceImplClass, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Creates a registry and exports the update service.static ServerUpdateUtilitiesThe singleton.
-
Constructor Details
-
ServerUpdateUtilities
public ServerUpdateUtilities()Creates a server update utilities instance.
-
-
Method Details
-
getInstance
The singleton.- Returns:
- the singleton
-
exportUpdateService
public void exportUpdateService(String serviceUrlName, String updateUrlName, Class<? extends UpdateService> updateServiceImplClass, RMIClientSocketFactory csf, 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 remoteUpdateServicecsf- the client socket factory, null if system defaultssf- the server socket factory, null if system default
-
exportUpdateService
public void exportUpdateService(String serviceUrlName, String updateUrlName, 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 remoteUpdateService
-
createUpdateServiceImpl
protected UpdateService createUpdateServiceImpl(Class<? extends UpdateService> updateServiceImplClass, int port, String updateUrlName, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Creates the update service implementation.
Invoked byexportUpdateService(String, String, Class, RMIClientSocketFactory, RMIServerSocketFactory).- Parameters:
updateServiceImplClass- the class implementing the remoteUpdateServiceport- the ip portupdateUrlName- the download base URLcsf- the client socket factory, null if system defaultssf- the server socket factory, null if system default- Returns:
- the service implementation
-