@Override public KnifeTaskFactory<String> requiringZeroAndReturningStdout() { return (KnifeTaskFactory<String>) super.requiringZeroAndReturningStdout(); } }
@Override public <RET2> KnifeTaskFactory<RET2> returning(Function<ProcessTaskWrapper<?>, RET2> resultTransformation) { return (KnifeTaskFactory<RET2>) super.returning(resultTransformation); }
@Override public KnifeTaskFactory<Boolean> returningIsExitCodeZero() { return (KnifeTaskFactory<Boolean>) super.returningIsExitCodeZero(); }
@Override public T machine(SshMachineLocation machine) { log.warn("Not permitted to set machines on "+this+" (ignoring - "+machine+")"); if (log.isDebugEnabled()) log.debug("Source of attempt to set machines on "+this+" ("+machine+")", new Throwable("Source of attempt to set machines on "+this+" ("+machine+")")); return self(); }
@Override public List<Function<ProcessTaskWrapper<?>, Void>> getCompletionListeners() { MutableList<Function<ProcessTaskWrapper<?>, Void>> result = MutableList.copyOf(super.getCompletionListeners()); if (throwOnCommonKnifeErrors != Boolean.FALSE) insertKnifeCompletionListenerIntoCompletionListenersList(result); return result.toImmutable(); }
@Override public List<String> getCommands() { MutableList<String> result = new MutableList<String>(); String setupCommands = knifeSetupCommands(); if (setupCommands != null && Strings.isNonBlank(setupCommands)) result.add(setupCommands); int numKnifes = 0; for (String c: super.getCommands()) { if (c==KNIFE_PLACEHOLDER) result.add(buildKnifeCommand(numKnifes++)); else result.add(c); } if (numKnifes==0) result.add(buildKnifeCommand(numKnifes++)); return result.toImmutable(); }
@Override public <T2> KnifeTaskFactory<T2> returning(ScriptReturnType type) { return (KnifeTaskFactory<T2>) super.<T2>returning(type); }