public ProcessController createProcessController(final ProcessControllerParameters arguments, final int pid) { if (pid < 1) { throw new IllegalArgumentException("Invalid pid '" + pid + "' specified"); } try { if (isAttachAPIFound()) { return new MBeanProcessController((MBeanControllerParameters)arguments, pid); } else { return new FileProcessController((FileControllerParameters)arguments, pid); } } catch (final ExceptionInInitializerError e) { //LOGGER.warn("Attach API class not found", e); } return null; }
@Override public String status() throws UnableToControlProcessException, IOException, InterruptedException, TimeoutException { return status(this.arguments.getWorkingDirectory(), this.arguments.getProcessType().getStatusRequestFileName(), this.arguments.getProcessType().getStatusFileName()); }
@Override public void stop() throws UnableToControlProcessException, IOException { stop(this.arguments.getWorkingDirectory(), this.arguments.getProcessType().getStopRequestFileName()); }
@Override public String status() throws UnableToControlProcessException, IOException, InterruptedException, TimeoutException { return status(this.arguments.getWorkingDirectory(), this.arguments.getProcessType().getStatusRequestFileName(), this.arguments.getProcessType().getStatusFileName()); }
@Override public void stop() throws UnableToControlProcessException, IOException { stop(this.arguments.getWorkingDirectory(), this.arguments.getProcessType().getStopRequestFileName()); }
public ProcessController createProcessController(final ProcessControllerParameters arguments, final int pid) { if (arguments == null) { throw new NullPointerException("ProcessControllerParameters must not be null"); } if (pid < 1) { throw new IllegalArgumentException("Invalid pid '" + pid + "' specified"); } try { if (isAttachAPIFound()) { return new MBeanProcessController((MBeanControllerParameters)arguments, pid); } else { return new FileProcessController((FileControllerParameters)arguments, pid); } } catch (final ExceptionInInitializerError e) { //LOGGER.warn("Attach API class not found", e); } return null; }