public InputState stop(MessageInput input) { InputState inputState = getRunningInputState(input.getId()); if (inputState != null) { try { input.stop(); } catch (Exception e) { LOG.warn("Stopping input <{}> failed, removing anyway: {}", input.getId(), e); } removeFromRunning(input); inputState.setState(InputState.InputStateType.STOPPED); finishedStop(inputState); } return inputState; }