}
public void executeCommand(DaemonConnection connection, Command command, DaemonContext daemonContext, DaemonStateControl daemonStateControl) {
if (command instanceof Stop) {
daemonStateControl.requestForcefulStop();
connection.completed(new Success(null));
} else if (command instanceof StopWhenIdle) {
daemonStateControl.requestStop();
connection.completed(new Success(null));
} else {
executer.executeCommand(connection, command, daemonContext, daemonStateControl);
}
}