@Override public ExecResponse call() { checkState(ssh != null, "please call init() before invoking call"); try { ssh.connect(); ExecResponse returnVal = doCall(); eventBus.post(new StatementOnNodeCompletion(init, node, returnVal)); return returnVal; } finally { if (ssh != null) ssh.disconnect(); } }
@Override public ExecResponse call() { checkState(ssh != null, "please call init() before invoking call"); try { ssh.connect(); ExecResponse returnVal = doCall(); eventBus.post(new StatementOnNodeCompletion(init, node, returnVal)); return returnVal; } finally { if (ssh != null) ssh.disconnect(); } }
@Override public ExecResponse call() { checkState(ssh != null, "please call init() before invoking call"); try { ssh.connect(); ExecResponse returnVal = doCall(); eventBus.post(new StatementOnNodeCompletion(init, node, returnVal)); return returnVal; } finally { if (ssh != null) ssh.disconnect(); } }
@Override public ExecResponse call() { checkState(ssh != null, "please call init() before invoking call"); try { ssh.connect(); ExecResponse returnVal = doCall(); eventBus.post(new StatementOnNodeCompletion(init, node, returnVal)); return returnVal; } finally { if (ssh != null) ssh.disconnect(); } }
public BlockUntilInitScriptStatusIsZeroThenReturnOutput future() { ExecResponse returnVal = super.doCall(); if (returnVal.getExitStatus() != 0) { IllegalStateException e = new IllegalStateException(String.format( "instance: %s on node: %s had non-zero exit status: %s", init.getInstanceName(), getNode().getId(), returnVal)); eventBus.post(new StatementOnNodeFailure(init, node, e)); throw e; } return statusFactory.create(this).init(); }
public BlockUntilInitScriptStatusIsZeroThenReturnOutput future() { ExecResponse returnVal = super.doCall(); if (returnVal.getExitStatus() != 0) { IllegalStateException e = new IllegalStateException(String.format( "instance: %s on node: %s had non-zero exit status: %s", init.getInstanceName(), getNode().getId(), returnVal)); eventBus.post(new StatementOnNodeFailure(init, node, e)); throw e; } return statusFactory.create(this).init(); }
public BlockUntilInitScriptStatusIsZeroThenReturnOutput future() { ExecResponse returnVal = super.doCall(); if (returnVal.getExitStatus() != 0) { IllegalStateException e = new IllegalStateException(String.format( "instance: %s on node: %s had non-zero exit status: %s", init.getInstanceName(), getNode().getId(), returnVal)); eventBus.post(new StatementOnNodeFailure(init, node, e)); throw e; } return statusFactory.create(this).init(); }
public BlockUntilInitScriptStatusIsZeroThenReturnOutput future() { ExecResponse returnVal = super.doCall(); if (returnVal.getExitStatus() != 0) { IllegalStateException e = new IllegalStateException(String.format( "instance: %s on node: %s had non-zero exit status: %s", init.getInstanceName(), getNode().getId(), returnVal)); eventBus.post(new StatementOnNodeFailure(init, node, e)); throw e; } return statusFactory.create(this).init(); }