private void performAction(String routeId, String action, CamelContext context) throws Exception { logger.debug("Excecuting " + action + " on " + routeId); if (action.equals(STOP)) { context.stopRoute(routeId); } else if (action.equals(START)) { context.startRoute(routeId); } else if (action.equals(SUSPEND)) { context.suspendRoute(routeId); } else if (action.equals(RESUME)) { context.resumeRoute(routeId); } else { throw new UnsupportedOperationException( "Unknown action " + action + ". Action should be STOP, START, SUSPEND or RESUME"); } }