Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiSession

All Superinterfaces:
EbiCacheHolder, Serializable

public interface EbiSession
extends EbiCacheHolder

Generic interface for a portal session. In a component, you can get an EbiSession object from EbiContext.

A session holds cached data that persists between requests. The session includes a "whiteboard" that can hold values that a component needs to keep available. You give each whiteboard value a key (either a one-part or two-part key), which you use to retrieve the value. EbiSession is also a cache holder for a session-lifetime managed cache. For information about the managed cache, see EbiCacheManager and EbiCacheHolder.

The context does not persist between requests. When another request occurs, the session becomes part of the new context object and is passed back to the component.

In a portal application, the client session (EbiSession) can be associated with multiple HTTP sessions (EbiHttpSession). Each WAR in the portal application requires a separate HTTP session.

See Also:
com.sssw.fw.api.EbiHttpSession, EbiContext, EbiPortalContext

Field Summary
static String LOCALE
          A String specifying text to use for a locale key.
 
Method Summary
 Map getCachedValues()
          Gets all the cached key/value pairs for the content stored by the cache manager.
 String getSessionID()
          Gets the session's String identifier.
 Object getValue(String key)
          Returns a value from the whiteboard.
 void removeValue(String key)
          Removes a key/value pair from the whiteboard.
 void setValue(String key, Object value)
          Sets a value on the whiteboard, binding it to the specified key.
 
Methods implemented from interface com.sssw.fw.api.EbiCacheHolder
clearCache, clearCache, containsContent, displayCacheEntries, getCachedObjects, getContentKeys, getIdentifier, getNumberOfCachedEntries, getObjectInCache, getObjectInCache, getObjectInCache, getValueInCache, getValueInCache, putObjectInCache, putObjectInCache, putObjectInCache, putValueInCache, putValueInCache, removeObjectInCache, removeObjectInCache, removeObjectInCache, removeValueInCache, removeValueInCache, setIdentifier
 

Field Detail

LOCALE

public static final String LOCALE
A String specifying text to use for a locale key.
Method Detail

getSessionID

public String getSessionID()
Gets the session's String identifier.
Returns:
The session ID.

getValue

public Object getValue(String key)
Returns a value from the whiteboard. If the key you specify does not exist, getValue() returns null.

If the value was added using a component key and a content key, use #getValue(String, String) instead.

For information about the whiteboard, see EbiContext.

Parameters:
key - The key for the object.
Returns:
The object with the specified key.
See Also:
EbiSession.setValue(String, Object)

setValue

public void setValue(String key,
                     Object value)
Sets a value on the whiteboard, binding it to the specified key. If the key already exists, its value is replaced. The value can be any object type.

The whiteboard provides persistent storage for key/value pairs. For information about the whiteboard, see EbiContext.

Parameters:
key - A String specifying the key for the object.
value - The object to be stored in the session's whiteboard. The object cannot be null.
See Also:
EbiSession.getValue(String)

removeValue

public void removeValue(String key)
Removes a key/value pair from the whiteboard. If the session whiteboard does not have the specified compound key, this method does nothing.

If the value was added using a component key and a content key, use EbiSession.removeValue(String) instead.

For information about the whiteboard, see EbiContext.

Parameters:
key - The key for the object.

getCachedValues

public Map getCachedValues()
Gets all the cached key/value pairs for the content stored by the cache manager.
Returns:
A Map object that contains the cached data as key/value pairs.

Novell exteNd
Director 5.2 API