/** * Writes the content of the buffer to the specified response. Also sets the properties and and * headers. * * @param response */ public void writeTo(final WebResponse response) { Args.notNull(response, "response"); Collections.sort(actions); for (Action action : actions) { action.invoke(response); } }
/** * transfer cookie operations (add, clear) to given web response * * @param response * web response that should receive the current cookie operation */ @Override public void writeMetaData(WebResponse response) { for (Action action : actions) { if (action.getType() == ActionType.HEADER) action.invoke(response); } }
/** * transfer cookie operations (add, clear) to given web response * * @param response * web response that should receive the current cookie operation */ @Override public void writeMetaData(WebResponse response) { for (Action action : actions) { if (action instanceof MetaDataAction) action.invoke(response); } }
/** * Writes the content of the buffer to the specified response. Also sets the properties and and * headers. * * @param response */ public void writeTo(final WebResponse response) { Args.notNull(response, "response"); Collections.sort(actions); for (Action action : actions) { action.invoke(response); } }
protected final Action action(Consumer<WebResponse> action) { return new Action(this, action); } }
@Override public boolean isRedirect() { for (Action action : actions) { if (action.getType() == ActionType.REDIRECT) { return true; } } return false; }