* If an action of this type receives a command that is not Build it will throw an exception.
*/
abstract public class BuildCommandOnly implements DaemonCommandAction {
public void execute(DaemonCommandExecution execution) {
Command command = execution.getCommand();
if (!(command instanceof Build)) {
throw new IllegalStateException(String.format("{} command action received a command that isn't Build (command is {}), this shouldn't happen", this.getClass(), command.getClass()));
}
doBuild(execution, (Build)command);
}