1 29 30 package com.caucho.server.deploy; 31 32 47 public class StartLazyRedeployManualStrategy 48 extends StartManualRedeployManualStrategy { 49 private final static StartLazyRedeployManualStrategy STRATEGY = 50 new StartLazyRedeployManualStrategy(); 51 52 private StartLazyRedeployManualStrategy() 53 { 54 } 55 56 61 public static DeployControllerStrategy create() 62 { 63 return STRATEGY; 64 } 65 66 71 public<I extends DeployInstance> 72 void startOnInit(DeployController<I> controller) 73 { 74 controller.stopLazyImpl(); 75 } 76 77 83 public <I extends DeployInstance> 84 I request(DeployController<I> controller) 85 { 86 if (controller.isStoppedLazy()) { 87 return controller.startImpl(); 88 } 89 else if (controller.isStopped()) { 90 return controller.getDeployInstance(); 91 } 92 else { 93 return controller.getDeployInstance(); 94 } 95 } 96 97 103 public <I extends DeployInstance> 104 I subrequest(DeployController<I> controller) 105 { 106 if (controller.isStoppedLazy()) { 107 return controller.startImpl(); 108 } 109 else if (controller.isStopped()) { 110 return controller.getDeployInstance(); 111 } 112 else { 113 return controller.getDeployInstance(); 115 } 116 } 117 } 118 | Popular Tags |