public abstract class SessionAwareHandler extends Object implements org.vertx.java.core.Handler<org.vertx.java.core.http.HttpServerRequest>
Wrapper handler providing all session attributes for the next handler in the chain.
This handler uses the sessionHelper from campudus for session creation, attributes saving and retrieval. It is the next handler responsibility to save the updated session attributes by calling the saveSessionAttributes method.
The stateless field indicates wether we should really relies on a session management system:
Modifier and Type | Field and Description |
---|---|
protected SessionHelper |
sessionHelper |
Constructor and Description |
---|
SessionAwareHandler(boolean stateless) |
SessionAwareHandler(SessionHelper sessionHelper) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doHandle(org.vertx.java.core.http.HttpServerRequest req,
String sessionId,
org.vertx.java.core.json.JsonObject sessionAttributes) |
void |
handle(org.vertx.java.core.http.HttpServerRequest req) |
protected boolean |
isStateless() |
protected void |
saveSessionAttributes(String sessionId,
org.vertx.java.core.json.JsonObject sessionAttributes,
org.vertx.java.core.Handler<org.vertx.java.core.json.JsonObject> handler) |
protected SessionHelper sessionHelper
public SessionAwareHandler(boolean stateless)
public SessionAwareHandler(SessionHelper sessionHelper)
public void handle(org.vertx.java.core.http.HttpServerRequest req)
handle
in interface org.vertx.java.core.Handler<org.vertx.java.core.http.HttpServerRequest>
protected void saveSessionAttributes(String sessionId, org.vertx.java.core.json.JsonObject sessionAttributes, org.vertx.java.core.Handler<org.vertx.java.core.json.JsonObject> handler)
protected boolean isStateless()
protected abstract void doHandle(org.vertx.java.core.http.HttpServerRequest req, String sessionId, org.vertx.java.core.json.JsonObject sessionAttributes)
Copyright © 2015. All rights reserved.