synchronized void destroy() { InternalState required = this.requiredState; if(required == InternalState.STOPPED) { if(internalState != InternalState.STOPPED) { try { processControllerClient.destroyProcess(serverProcessName); } catch (IOException e) { ROOT_LOGGER.logf(DEBUG_LEVEL, e, "failed to send destroy_process message to %s", serverName); } } } else { // Do the normal stop stuff first stop(null); required = this.requiredState; if (required == InternalState.STOPPED) { // Now proceed to destroy, assuming that there was a reason the user // invoked this op, and that stop() alone will not suffice // The PC will give it a bit of time to do a normal stop before destroying destroy(); } // else something is odd but avoid looping. User would have to invoke the op again } }
synchronized void destroy() { InternalState required = this.requiredState; if(required == InternalState.STOPPED) { if(internalState != InternalState.STOPPED) { try { processControllerClient.destroyProcess(serverProcessName); } catch (IOException e) { ROOT_LOGGER.logf(DEBUG_LEVEL, e, "failed to send destroy_process message to %s", serverName); } } } else { // Do the normal stop stuff first stop(null); required = this.requiredState; if (required == InternalState.STOPPED) { // Now proceed to destroy, assuming that there was a reason the user // invoked this op, and that stop() alone will not suffice // The PC will give it a bit of time to do a normal stop before destroying destroy(); } // else something is odd but avoid looping. User would have to invoke the op again } }