io.vertx.rxjava.ext.web.sstore

## Class SessionStore

- java.lang.Object
- - io.vertx.rxjava.ext.web.sstore.SessionStore

- Direct Known Subclasses:
    ClusteredSessionStore, LocalSessionStore

      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 the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<SessionStore>` | `__TYPE_ARG`
    `static int` | `DEFAULT_SESSIONID_LENGTH` Default length for a session id.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SessionStore(Object delegate)`
    `SessionStore(SessionStore delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear(Handler<AsyncResult<Void>> resultHandler)` Remove all sessions from the store.
    `Observable<Void>` | `clearObservable()` Deprecated. use `rxClear()` instead
    `void` | `close()` Close the store
    `static SessionStore` | `create(Vertx vertx)` Create a Session store given a backend and configuration JSON.
    `static SessionStore` | `create(Vertx vertx, JsonObject options)` Create a Session store given a backend and configuration JSON.
    `Session` | `createSession(long timeout)` Create a new session using the default min length.
    `Session` | `createSession(long timeout, int length)` Create a new session.
    `void` | `delete(String id, Handler<AsyncResult<Void>> resultHandler)` Delete the session with the specified ID.
    `Observable<Void>` | `deleteObservable(String id)` Deprecated. use `rxDelete(java.lang.String)` instead
    `boolean` | `equals(Object o)`
    `void` | `get(String cookieValue, Handler<AsyncResult<Session>> resultHandler)` Get the session with the specified ID.
    `SessionStore` | `getDelegate()`
    `Observable<Session>` | `getObservable(String cookieValue)` Deprecated. use `rxGet(java.lang.String)` instead
    `int` | `hashCode()`
    `SessionStore` | `init(Vertx vertx, JsonObject options)` Initialize this store.
    `static SessionStore` | `newInstance(SessionStore arg)`
    `void` | `put(Session session, Handler<AsyncResult<Void>> resultHandler)` Add a session with the specified ID.
    `Observable<Void>` | `putObservable(Session session)` Deprecated. use `rxPut(io.vertx.rxjava.ext.web.Session)` instead
    `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.
    `Single<Void>` | `rxClear()` Remove all sessions from the store.
    `Single<Void>` | `rxDelete(String id)` Delete the session with the specified ID.
    `Single<Session>` | `rxGet(String cookieValue)` Get the session with the specified ID.
    `Single<Void>` | `rxPut(Session session)` Add a session with the specified ID.
    `Single<Integer>` | `rxSize()` Get the number of sessions in the store.
    `void` | `size(Handler<AsyncResult<Integer>> resultHandler)` Get the number of sessions in the store.
    `Observable<Integer>` | `sizeObservable()` Deprecated. use `rxSize()` instead
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### 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 instance
        `options` - 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 instance
        `options` - 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 ms
        `length` - - the required length for the session id
      Returns:
        the session

    - #### get

          public void get(String cookieValue,
                          Handler<AsyncResult<Session>> resultHandler)

      Get the session with the specified ID.
      Parameters:
        `cookieValue` - the unique ID of the session
        `resultHandler` - will be called with a result holding the session, or a failure

    - #### getObservable

          @Deprecated
          public Observable<Session> getObservable(String cookieValue)

      Deprecated. use `rxGet(java.lang.String)` instead
      Get the session with the specified ID.
      Parameters:
        `cookieValue` - the unique ID of the session
      Returns:

    - #### rxGet

          public Single<Session> rxGet(String cookieValue)

      Get the session with the specified ID.
      Parameters:
        `cookieValue` - the unique ID of the session
      Returns:

    - #### delete

          public void delete(String id,
                             Handler<AsyncResult<Void>> resultHandler)

      Delete the session with the specified ID.
      Parameters:
        `id` - the session id
        `resultHandler` - will be called with a success or a failure

    - #### deleteObservable

          @Deprecated
          public Observable<Void> deleteObservable(String id)

      Deprecated. use `rxDelete(java.lang.String)` instead
      Delete the session with the specified ID.
      Parameters:
        `id` - the session id
      Returns:

    - #### rxDelete

          public Single<Void> rxDelete(String id)

      Delete the session with the specified ID.
      Parameters:
        `id` - the session id
      Returns:

    - #### put

          public void put(Session session,
                          Handler<AsyncResult<Void>> resultHandler)

      Add a session with the specified ID.
      Parameters:
        `session` - the session
        `resultHandler` - will be called with a success or a failure

    - #### putObservable

          @Deprecated
          public Observable<Void> putObservable(Session session)

      Deprecated. use `rxPut(io.vertx.rxjava.ext.web.Session)` instead
      Add a session with the specified ID.
      Parameters:
        `session` - the session
      Returns:

    - #### rxPut

          public Single<Void> rxPut(Session session)

      Add a session with the specified ID.
      Parameters:
        `session` - the session
      Returns:

    - #### clear

          public void clear(Handler<AsyncResult<Void>> resultHandler)

      Remove all sessions from the store.
      Parameters:
        `resultHandler` - will be called with a success or a failure

    - #### clearObservable

          @Deprecated
          public Observable<Void> clearObservable()

      Deprecated. use `rxClear()` instead
      Remove all sessions from the store.
      Returns:

    - #### rxClear

          public Single<Void> rxClear()

      Remove all sessions from the store.
      Returns:

    - #### size

          public void size(Handler<AsyncResult<Integer>> resultHandler)

      Get the number of sessions in the store.

      Beware of the result which is just an estimate, in particular with distributed session stores.

      Parameters:
        `resultHandler` - will be called with the number, or a failure

    - #### sizeObservable

          @Deprecated
          public Observable<Integer> sizeObservable()

      Deprecated. use `rxSize()` instead
      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 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)

Copyright © 2020 Eclipse. All rights reserved.