org.apache.uima.resource

## Interface Session

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    Session_impl, SessionNamespaceView_impl

      public interface Session
      extends Serializable

  An object that encapsulates all conversational state between a UIMA `Resource` and a particular client. In a local deployment, there will probably be only one session. Distributed deployments often have multiple sessions. If multiple sessions are in use, it is the application's or service wrapper's responsibility to make sure that a Resource's `Session` object is properly set up prior to invoking any of that Resource's methods.

  Note that a particular component, such as an annotator, may get a handle to a Session object that actually represents a particular namespace within a larger Session. This allows each component to use arbitrary keys for storing information in the session without risking name collisions.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get(String aKey)` Gets an object from the Session
    `void` | `put(String aKey, Object aValue)` Stores an object in the Session

- - ### Method Detail

    - #### put

          void put(String aKey,
                   Object aValue)

      Stores an object in the Session
      Parameters:
        `aKey` - Key
        `aValue` - Value

    - #### get

          Object get(String aKey)

      Gets an object from the Session
      Parameters:
        `aKey` - Key
      Returns:
        the associated value

Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.