Package io.vertx.rxjava3.ext.web.sstore
Class SessionStore
- java.lang.Object
-
- io.vertx.rxjava3.ext.web.sstore.SessionStore
-
- Direct Known Subclasses:
ClusteredSessionStore,CookieSessionStore,InfinispanSessionStore,LocalSessionStore,RedisSessionStore
public class SessionStore extends Object
A session store is used to store sessions for an Vert.x-Web web app NOTE: This class has been automatically generated from theoriginalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<SessionStore>__TYPE_ARGstatic intDEFAULT_SESSIONID_LENGTHDefault length for a session id.
-
Constructor Summary
Constructors Constructor Description SessionStore(SessionStore delegate)SessionStore(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Completableclear()Remove all sessions from the store.voidclose()Close the storestatic SessionStorecreate(Vertx vertx)Create a Session store given a backend and configuration JSON.static SessionStorecreate(Vertx vertx, JsonObject options)Create a Session store given a backend and configuration JSON.SessioncreateSession(long timeout)Create a new session using the default min length.SessioncreateSession(long timeout, int length)Create a new session.io.reactivex.rxjava3.core.Completabledelete(String id)Delete the session with the specified ID.booleanequals(Object o)io.reactivex.rxjava3.core.Maybe<Session>get(String cookieValue)Get the session with the specified ID.SessionStoregetDelegate()inthashCode()SessionStoreinit(Vertx vertx, JsonObject options)Initialize this store.static SessionStorenewInstance(SessionStore arg)io.reactivex.rxjava3.core.Completableput(Session session)Add a session with the specified ID.longretryTimeout()The retry timeout value in milli seconds used by the session handler when it retrieves a value from the store.io.reactivex.rxjava3.core.CompletablerxClear()Remove all sessions from the store.io.reactivex.rxjava3.core.CompletablerxDelete(String id)Delete the session with the specified ID.io.reactivex.rxjava3.core.Maybe<Session>rxGet(String cookieValue)Get the session with the specified ID.io.reactivex.rxjava3.core.CompletablerxPut(Session session)Add a session with the specified ID.io.reactivex.rxjava3.core.Single<Integer>rxSize()Get the number of sessions in the store.io.reactivex.rxjava3.core.Single<Integer>size()Get the number of sessions in the store.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<SessionStore> __TYPE_ARG
-
DEFAULT_SESSIONID_LENGTH
public static final int DEFAULT_SESSIONID_LENGTH
Default length for a session id. More info: https://www.owasp.org/index.php/Session_Management_Cheat_Sheet- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SessionStore
public SessionStore(SessionStore delegate)
-
SessionStore
public SessionStore(Object delegate)
-
-
Method Detail
-
getDelegate
public SessionStore getDelegate()
-
create
public static SessionStore create(Vertx vertx)
Create a Session store given a backend and configuration JSON.- Parameters:
vertx- vertx instance- Returns:
- the store or runtime exception
-
create
public static SessionStore create(Vertx vertx, JsonObject options)
Create a Session store given a backend and configuration JSON.- Parameters:
vertx- vertx instanceoptions- extra options for initialization- Returns:
- the store or runtime exception
-
init
public SessionStore init(Vertx vertx, JsonObject options)
Initialize this store.- Parameters:
vertx- the vertx instanceoptions- optional Json with extra configuration options- Returns:
- self
-
retryTimeout
public long retryTimeout()
The retry timeout value in milli seconds used by the session handler when it retrieves a value from the store. A non positive value means there is no retry at all.- Returns:
- the timeout value, in ms
-
createSession
public Session createSession(long timeout)
Create a new session using the default min length.- Parameters:
timeout- - the session timeout, in ms- Returns:
- the session
-
createSession
public Session createSession(long timeout, int length)
Create a new session.- Parameters:
timeout- - the session timeout, in mslength- - the required length for the session id- Returns:
- the session
-
get
public io.reactivex.rxjava3.core.Maybe<Session> get(String cookieValue)
Get the session with the specified ID.- Parameters:
cookieValue- the unique ID of the session- Returns:
-
rxGet
public io.reactivex.rxjava3.core.Maybe<Session> rxGet(String cookieValue)
Get the session with the specified ID.- Parameters:
cookieValue- the unique ID of the session- Returns:
-
delete
public io.reactivex.rxjava3.core.Completable delete(String id)
Delete the session with the specified ID.- Parameters:
id- the session id- Returns:
-
rxDelete
public io.reactivex.rxjava3.core.Completable rxDelete(String id)
Delete the session with the specified ID.- Parameters:
id- the session id- Returns:
-
put
public io.reactivex.rxjava3.core.Completable put(Session session)
Add a session with the specified ID.- Parameters:
session- the session- Returns:
-
rxPut
public io.reactivex.rxjava3.core.Completable rxPut(Session session)
Add a session with the specified ID.- Parameters:
session- the session- Returns:
-
clear
public io.reactivex.rxjava3.core.Completable clear()
Remove all sessions from the store.- Returns:
-
rxClear
public io.reactivex.rxjava3.core.Completable rxClear()
Remove all sessions from the store.- Returns:
-
size
public io.reactivex.rxjava3.core.Single<Integer> size()
Get the number of sessions in the store.Beware of the result which is just an estimate, in particular with distributed session stores.
- Returns:
-
rxSize
public io.reactivex.rxjava3.core.Single<Integer> rxSize()
Get the number of sessions in the store.Beware of the result which is just an estimate, in particular with distributed session stores.
- Returns:
-
close
public void close()
Close the store
-
newInstance
public static SessionStore newInstance(SessionStore arg)
-
-