com.sun.portal.wireless.taglibs.base
Class ContextCache

java.lang.Object
  extended bycom.sun.portal.wireless.taglibs.base.ContextCache
Direct Known Subclasses:
ABContextCache, CalContextCache, MailContextCache, UtilContextCache

public class ContextCache
extends java.lang.Object

Base cache class for holding Context objects.

See Also:
Context

Field Summary
protected static java.util.HashMap contextCache
           
protected  java.util.HashMap contexts
           
protected static int START_SIZE
           
 
Constructor Summary
ContextCache()
          Private ContextCache constructor; use getInstance() instead to get a handle to an instance.
 
Method Summary
 Context get(SSOToken session, java.lang.String configName)
          Get context from the specified session
static ContextCache getInstance(java.lang.String className)
          Return an instance; creating one if needed
 void put(Context context, java.lang.String configName)
          Put a context into the cache
 void put(Context context, java.lang.String configName, boolean listener)
          Put a context into the cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextCache

protected static java.util.HashMap contextCache

START_SIZE

protected static final int START_SIZE
See Also:
Constant Field Values

contexts

protected java.util.HashMap contexts
Constructor Detail

ContextCache

public ContextCache()
Private ContextCache constructor; use getInstance() instead to get a handle to an instance.

Method Detail

getInstance

public static ContextCache getInstance(java.lang.String className)
Return an instance; creating one if needed

Returns:
the ContextCache instance

put

public void put(Context context,
                java.lang.String configName)
Put a context into the cache

Parameters:
context - the context

put

public void put(Context context,
                java.lang.String configName,
                boolean listener)
Put a context into the cache

Parameters:
context - the context
listener - whether to add a session listener

get

public Context get(SSOToken session,
                   java.lang.String configName)
Get context from the specified session

Parameters:
session - the portal session
Returns:
the saved context