|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.service.session.SessionEnv
Provides a collection of key/value pairs describing a session environment. SessionEnv affects the behavior of the session and its children.
SessionEnv has been optimized to be cloneable without requiring a new copy of it's internal data until that data is modified. This is a performance and memory usage optimization. Until the internal hashtable is modified, clones of this object share the hashtable.
Field Summary | |
static java.lang.String |
ALLOW_BACKGROUND_VALIDATION
Key describing whether or not a separate thread will be spawned by the SessionManager to keep Sessions validated. |
static java.lang.String |
INITIAL_SESSION_FACTORY
Key describing initial sessions and their load order in a colon-separated list. |
static java.lang.String |
RMI_SOCKET_FACTORIES_OBJECT
Key indicating whether to use custom RMI sockets when running in RMI mode. |
static java.lang.String |
SESSION_MANAGER_SERVICE
Deprecated. Use SESSION_MANAGER_URL |
static java.lang.String |
SESSION_MANAGER_URL
Key indicating whether to run local or in RMI mode Set this key to the location of the remote SessionManager to run RMI |
Constructor Summary | |
SessionEnv()
Constructs a new, empty session environment that is shared. |
Method Summary | |
void |
add(java.lang.String key,
java.lang.Object val)
Adds a new entry to this environment. |
void |
clear()
Clears this environment so it contains no keys. |
java.lang.Object |
clone()
Creates a new copy of this environment. |
boolean |
contains(java.lang.Object value)
Determines if some value maps into the specified value of this environment. |
boolean |
containsKey(java.lang.String key)
Determines if a key maps into the specified key of this environment. |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this environment. |
java.lang.Object |
get(java.lang.String key)
Returns the value to which the specified key is mapped in this environment. |
boolean |
isEmpty()
Determines if this environment is empty. |
java.util.Enumeration |
keys()
Returns an enumeration of the keys in this environment. |
boolean |
matchesSubset(SessionEnv subEnv)
Determines if the passed-in subEnv is a subset of this set and all attributes match. |
void |
merge(java.util.Properties subSet)
Merge properties into this session environment. |
void |
merge(SessionEnv subSet)
Merge two session environments together. |
void |
modify(java.util.Properties subSet)
Replaces the attributes in this set by those in subSet, or adds any that do not exist. |
void |
modify(SessionEnv newEnv)
Replaces the attributes in this set by those in newEnv, or adds any that do not exist. |
java.lang.Object |
modify(java.lang.String key,
java.lang.Object val)
Replaces the entry identified by key with val, or adds it if it does not exist. |
java.lang.Object |
mustGet(java.lang.String key)
Returns the value to which the specified key is mapped in this environment. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Maps the specified key to the specified value in this environment. |
java.lang.Object |
remove(java.lang.String key)
Removes the key and it's value from this environment. |
int |
size()
Returns the number keys in this environment. |
java.lang.String |
toString()
Returns a string that textually represents this environment. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String INITIAL_SESSION_FACTORY
(INITIAL_SESSION_FACTORY = "com.novell.service.session.spi.InitialSessionFactory")
Following is a code example:
(SessionEnv)e.add(
INITIAL_SESSION_FACTORY,
"com.novell.service.session.nds.NDSInitialSessionFactory:" +
"com.novell.service.session.bindery.BinderyInitialSessionFactory");
public static final java.lang.String SESSION_MANAGER_URL
(SESSION_MANAGER_URL = "com.novell.service.session.spi.SessionManagerService")
Following is a code example:
SessionEnv env = new SessionEnv();
env.add(SessionEnv.SESSION_MANAGER_URL, rmiServerName);
SessionManager sm = SessionManagerFactory.getPrivate(env);
public static final java.lang.String RMI_SOCKET_FACTORIES_OBJECT
public static final java.lang.String SESSION_MANAGER_SERVICE
public static final java.lang.String ALLOW_BACKGROUND_VALIDATION
(ALLOW_BACKGROUND_VALIDATION = "com.novell.service.session.spi.SessionManagerServiceDaemon")
Following is a code example:
(SessionEnv)e.add(
ALLOW_BACKGROUND_VALIDATION,
new Boolean(true));
Constructor Detail |
public SessionEnv()
Method Detail |
public void add(java.lang.String key, java.lang.Object val) throws SessionException
key
- The key to be added.val
- The value to be added.public void clear()
public java.lang.Object clone()
For more information on this Object, see Sun's java.lang.Cloneable class.
public boolean contains(java.lang.Object value)
value
- The value for which to search.public boolean containsKey(java.lang.String key)
key
- The possible key for which to search.public java.util.Enumeration elements()
public java.lang.Object get(java.lang.String key)
key
- A key in the environment.public boolean isEmpty()
public java.util.Enumeration keys()
public boolean matchesSubset(SessionEnv subEnv)
subEnv
- The environment to match.public void merge(SessionEnv subSet) throws SessionException
subSet
- The environment to merge into this environment.public void merge(java.util.Properties subSet) throws SessionException
subSet
- The properties to merge.public java.lang.Object modify(java.lang.String key, java.lang.Object val)
key
- The key to be modified.val
- The value to modify.public void modify(SessionEnv newEnv)
newEnv
- The environment to use for modification.public void modify(java.util.Properties subSet)
subSet
- The attributes to use for modification.public java.lang.Object mustGet(java.lang.String key) throws EntryNotFoundException
key
- The specified key in this environment.public java.lang.Object put(java.lang.String key, java.lang.Object value)
key
- The key to map.value
- The value to map.public java.lang.Object remove(java.lang.String key)
key
- The key to remove.public int size()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |