io.vertx.rxjava.ext.web

## Class Session

- java.lang.Object
- - io.vertx.rxjava.ext.web.Session

-     public class Session
      extends Object

  Represents a browser session.

  Sessions persist between HTTP requests for a single browser session. They are deleted when the browser is closed, or they time-out. Session cookies are used to maintain sessions using a secure UUID.

  Sessions can be used to maintain data for a browser session, e.g. a shopping basket.

  The context must have first been routed to a `SessionHandler` for sessions to be available.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Session(Session delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroy the session
    `<T> T` | `get(String key)` Get some data from the session
    `Object` | `getDelegate()`
    `String` | `id()`
    `boolean` | `isDestroyed()`
    `long` | `lastAccessed()`
    `static Session` | `newInstance(Session arg)`
    `Session` | `put(String key, Object obj)` Put some data in a session
    `<T> T` | `remove(String key)` Remove some data from the session
    `void` | `setAccessed()` Mark the session as being accessed.
    `long` | `timeout()`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Session

          public Session(Session delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### id

          public String id()

      Returns:
        The unique ID of the session. This is generated using a random secure UUID.

    - #### put

          public Session put(String key,
                             Object obj)

      Put some data in a session
      Parameters:
        `key` - the key for the data
        `obj` - the data
      Returns:
        a reference to this, so the API can be used fluently

    - #### get

          public <T> T get(String key)

      Get some data from the session
      Parameters:
        `key` - the key of the data
      Returns:
        the data

    - #### remove

          public <T> T remove(String key)

      Remove some data from the session
      Parameters:
        `key` - the key of the data
      Returns:
        the data that was there or null if none there

    - #### lastAccessed

          public long lastAccessed()

      Returns:
        the time the session was last accessed

    - #### destroy

          public void destroy()

      Destroy the session

    - #### isDestroyed

          public boolean isDestroyed()

      Returns:
        has the session been destroyed?

    - #### timeout

          public long timeout()

      Returns:
        the amount of time in ms, after which the session will expire, if not accessed.

    - #### setAccessed

          public void setAccessed()

      Mark the session as being accessed.

    - #### newInstance

          public static Session newInstance(Session arg)

Copyright © 2016. All rights reserved.