1 29 30 package nextapp.echo2.app.update; 31 32 import java.io.Serializable ; 33 34 import nextapp.echo2.app.ApplicationInstance; 35 36 39 public class UpdateManager 40 implements Serializable { 41 42 private ClientUpdateManager clientUpdateManager; 43 private ServerUpdateManager serverUpdateManager; 44 private ApplicationInstance applicationInstance; 45 46 54 public UpdateManager(ApplicationInstance applicationInstance) { 55 super(); 56 this.applicationInstance = applicationInstance; 57 clientUpdateManager = new ClientUpdateManager(applicationInstance); 58 serverUpdateManager = new ServerUpdateManager(applicationInstance); 59 serverUpdateManager.init(clientUpdateManager); 60 } 61 62 68 public ClientUpdateManager getClientUpdateManager() { 69 return clientUpdateManager; 70 } 71 72 78 public ServerUpdateManager getServerUpdateManager() { 79 return serverUpdateManager; 80 } 81 82 87 public void processClientUpdates() { 88 clientUpdateManager.process(); 90 91 applicationInstance.processQueuedTasks(); 93 94 applicationInstance.doValidation(); 96 } 97 98 101 public void purge() { 102 clientUpdateManager.purge(); 103 serverUpdateManager.purge(); 104 } 105 } 106 | Popular Tags |