Interface Session


public interface Session
A shell session.
Author:
Julien Viet
  • Method Summary

    Modifier and Type
    Method
    Description
    static Session
    Create a new empty session.
    <T> T
    get(String key)
    Get some data from the session
    put(String key, Object obj)
    Put some data in a session
    <T> T
    Remove some data from the session
  • Method Details

    • create

      static Session create()
      Create a new empty session.
      Returns:
      the created session
    • put

      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

      <T> T get(String key)
      Get some data from the session
      Parameters:
      key - the key of the data
      Returns:
      the data
    • remove

      <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