@Override public String toString() { return "action: " + actionPath + (actionMethod == null ? "" : '#' + actionMethod) + " --> " + createActionString(); }
/** * Prints out the message. User can override this method and modify the way * the message is printed. */ protected void printBefore(final ActionRequest request) { StringBuilder message = new StringBuilder(prefixIn); message.append(request.getActionPath()).append(" [").append(request.getActionRuntime().createActionString()).append(']'); out(message.toString()); }
/** * Registers manually created {@link ActionRuntime action runtime configurations}. * Optionally, if action path with the same name already exist, * exception will be thrown. */ public ActionRuntime registerActionRuntime(final ActionRuntime actionRuntime) { final String actionPath = actionRuntime.getActionPath(); final String method = actionRuntime.getActionMethod(); log.debug(() -> "Madvoc action: " + ifNotNull(method, m -> m + " ") + actionRuntime.getActionPath() + " => " + actionRuntime.createActionString()); final RouteChunk routeChunk = routes.registerPath(method, actionPath); if (routeChunk.value() != null) { // existing chunk if (detectDuplicatePathsEnabled) { throw new MadvocException("Duplicate action path for [" + actionRuntime + "] occupied by: [" + routeChunk.value() + "]"); } } else { actionsCount++; } routeChunk.bind(actionRuntime); // finally runtimes.put(actionRuntime.createActionString(), actionRuntime); // async check if (actionRuntime.isAsync()) { asyncMode = true; } return actionRuntime; }
log.debug("Invoke action for '" + actionPath + "' using " + actionRuntime.createActionString());