- java.lang.Object
-
- org.tentackle.update.ServerUpdateUtilities
-
@Service(ServerUpdateUtilities.class) public class ServerUpdateUtilities extends java.lang.Object
Utility methods to implement the application update.
-
-
Constructor Summary
Constructors Constructor Description ServerUpdateUtilities()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UpdateServicecreateUpdateServiceImpl(java.lang.Class<? extends UpdateService> updateServiceImplClass, int port, java.lang.String updateUrlName, java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf)Creates the update service implementation.
Invoked byexportUpdateService(String, String, Class, RMIClientSocketFactory, RMIServerSocketFactory).voidexportUpdateService(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.voidexportUpdateService(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.static ServerUpdateUtilitiesgetInstance()The singleton.
-
-
-
Method Detail
-
getInstance
public static ServerUpdateUtilities getInstance()
The singleton.- Returns:
- the singleton
-
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 remoteUpdateServicecsf- the client socket factory, null if system defaultssf- 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 remoteUpdateService
-
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)
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
-
-