1 9 package org.jboss.portal.server.kernel; 10 11 import org.jboss.portal.server.kernel.state.State; 12 13 17 public class DestroyMethod extends DowngradeMethod 18 { 19 20 public DestroyMethod(Kernel kernel) 21 { 22 super(kernel); 23 } 24 25 protected void checkState(Entry entry) throws TransitionNotPossibleException 26 { 27 entry.machine.destroy(true); 28 } 29 30 protected void invokeMethod(Entry entry) throws Exception 31 { 32 entry.implementation.service.destroy(); 33 entry.machine.destroy(false); 34 } 35 36 protected void invokeMethodOnDependsOnMe(Entry entry) throws KernelException 37 { 38 if (entry.getState() == State.STOPPED || entry.getState() == State.STARTED) 39 { 40 kernel.destroy(entry.id); 41 } 42 } 43 } 44 | Popular Tags |