Interface Session

All Known Implementing Classes:
AxisHttpSession, SimpleSession

public interface Session
An abstract interface to provide session storage to Axis services. This is extremely basic at the moment.
Author:
Glen Daniels (gdaniels@apache.org)
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String key)
    Get a property from the session
    Get an enumeration of the keys in this session
    Get an Object suitable for synchronizing the session.
    int
    Return the sessions' time-to-live.
    void
    invalidate the session
    void
    Remove a property from the session
    void
    set(String key, Object value)
    Set a property in the session
    void
    setTimeout(int timeout)
    Set the session's time-to-live.
    void
    "Touch" the session (mark it recently used)
  • Method Details

    • get

      Object get(String key)
      Get a property from the session
      Parameters:
      key - the name of the property desired.
    • set

      void set(String key, Object value)
      Set a property in the session
      Parameters:
      key - the name of the property to set.
      value - the value of the property.
    • remove

      void remove(String key)
      Remove a property from the session
      Parameters:
      key - the name of the property desired.
    • getKeys

      Enumeration getKeys()
      Get an enumeration of the keys in this session
    • setTimeout

      void setTimeout(int timeout)
      Set the session's time-to-live. This is implementation-specific, but basically should be the # of seconds of inactivity which will cause the session to time out and invalidate. "inactivity" is implementation-specific.
    • getTimeout

      int getTimeout()
      Return the sessions' time-to-live.
      Returns:
      the timeout value for this session.
    • touch

      void touch()
      "Touch" the session (mark it recently used)
    • invalidate

      void invalidate()
      invalidate the session
    • getLockObject

      Object getLockObject()
      Get an Object suitable for synchronizing the session. This method exists because different session implementations might provide different ways of getting at shared data. For a simple hashtable- based session, this would just be the hashtable, but for sessions which use database connections, etc. it might be an object wrapping a table ID or somesuch.