A session store is used to store sessions for an Vert.x-Web web app
| Constructor and description |
|---|
SessionStore
(Object delegate) |
| Type | Name and description |
|---|---|
void |
clear(Handler<AsyncResult<Boolean>> resultHandler)Remove all sessions from the store |
void |
close()Close the store |
Session |
createSession(long timeout)Create a new session |
void |
delete(String id, Handler<AsyncResult<Boolean>> resultHandler)Delete the session with the specified ID |
void |
get(String id, Handler<AsyncResult<Session>> resultHandler)Get the session with the specified ID |
Object |
getDelegate() |
void |
put(Session session, Handler<AsyncResult<Boolean>> resultHandler)Add a session with the specified ID |
void |
size(Handler<AsyncResult<Integer>> resultHandler)Get the number of sessions in the store |
Remove all sessions from the store
resultHandler - will be called with a result true/false, or a failureClose the store
Create a new session
timeout - - the session timeout, in msDelete the session with the specified ID
id - the unique ID of the sessionresultHandler - will be called with a result true/false, or a failureGet the session with the specified ID
id - the unique ID of the sessionresultHandler - will be called with a result holding the session, or a failureAdd a session with the specified ID
session - the sessionresultHandler - will be called with a result true/false, or a failureGet the number of sessions in the store
resultHandler - will be called with the number, or a failureio.vertx:vertx-web:3.1.0