com.ibm.websphere.workarea
Interface UserWorkArea
All Superinterfaces:
java.io.Serializable
- public interface UserWorkArea
- extends java.io.Serializable
Version:
1.0
Method Summary
Modifier and Type | Method and Description |
---|---|
|
begin(java.lang.String name)
Begin a new WorkArea associated with it the current thread.
|
|
complete()
Will complete the current, active WorkArea and will lose the references
to any contained context.
|
|
get(java.lang.String key)
The get operation will search the current WorkArea for a corresponding
property.
|
getMode(java.lang.String key)
The getMode operation will search the current WorkArea for a corresponding
property's mode.
|
|
|
getName()
Returns the context's name.
|
|
remove(java.lang.String key)
Removes property from current WorkArea scope.
|
|
retrieveAllKeys()
Returns an array of all keys associated with the stack of WorkAreas for the
current thread.
|
|
set(java.lang.String key,java.io.Serializable value)
Set the specified property.
|
|
set(java.lang.String key,java.io.Serializable value,PropertyModeType mode)
Sets given property by mode.
|
Method Detail
begin
- void begin(java.lang.String name)
Begin a new WorkArea associated with it the current thread.
If there was already a WorkArea associated with the thread,
a new WorkArea will nest within the already-existing WorkArea.
Parameters:
name
- The name that will be associated with this WorkArea. Note
that the WorkArea service attaches no meaning to this name;
it is instead to be used by the application as desired. The
WorkArea service requires only that the name not be null. Throws:
java.lang.NullPointerException
- Thrown if the name reference is null. complete
- void complete()
- throws NoWorkArea
- NotOriginator
Will complete the current, active WorkArea and will lose the references
to any contained context. If there is a parent context, that context will
automatically become the current context.
Throws:
NoWorkArea
- Thrown if there is no active WorkArea associated with
the current thread. NotOriginator
- Thrown if the WorkArea was imported from another process. getName
- java.lang.String getName()
Returns the context's name. Returns null if there is no active context. This is the
suggested method for determining if there is an active WorkArea associated with the
current thread.
Returns:
the name of the context.
retrieveAllKeys
- java.lang.String[] retrieveAllKeys( )
Returns an array of all keys associated with the stack of WorkAreas for the
current thread. The keys are returned with no guarantee of order. Returns null
if there are no keys or if there is no active context.
Returns:
Array of strings.
set
- void set(java.lang.String key,
- java.io.Serializable value)
- throws NoWorkArea
- NotOriginator
- PropertyReadOnly
Set the specified property. PropertyModeType defaults to normal.
Parameters:
key
- May not be null. value
- May not be null. Throws:
NoWorkArea
- Thrown if there is no active WorkArea associated with the thread. NotOriginator
- Thrown if the active WorkArea was imported from another process. PropertyReadOnly
- Thrown if the corresponding property was set as read_only. java.lang.NullPointerException
- Thrown if the key is null. set
- void set(java.lang.String key,
- java.io.Serializable value,
- PropertyModeType mode)
- throws NoWorkArea
- NotOriginator
- PropertyReadOnly
Sets given property by mode.
Parameters:
key
- May not be null. value
- May not be null. mode
- May not be null. Throws:
NoWorkArea
- Thrown if there is no active WorkArea associated with the thread. NotOriginator
- Thrown if the active WorkArea was imported from another process. PropertyReadOnly
- Thrown if the corresponding property was set as read_only. java.lang.NullPointerException
- Thrown if the key or mode is null. get
- java.io.Serializable get(java.lang.String key)
The get operation will search the current WorkArea for a corresponding
property. If no value is found, the search will automatically continue
through the hierarchy of nested WorkAreas. Null is returned if there is
no associated property or if there is no active WorkArea.
Parameters:
key
- The key to search by. May not be null. Returns:
found value or null.
Throws:
NotSerializableError
- Thrown if the corresponding is not serializable (i.e., was set via a CORBA interface) java.lang.NullPointerException
- Thrown if the key is null. getMode
- PropertyModeType getMode(java.lang.String key)
The getMode operation will search the current WorkArea for a corresponding
property's mode. If no value is found, the search will automatically continue
through the hierarchy of nested WorkAreas. PropertyModeType.normal is returned if there is
no associated property or if there is no active WorkArea. Note that null is not
returned; normal mode implies that properties are not set to a higher level of
control, not that any property already exists.
Parameters:
key
- The key to search by. May not be null. Returns:
found value or null.
Throws:
java.lang.NullPointerException
- Thrown if the key is null. remove
- void remove(java.lang.String key)
- throws NoWorkArea
- NotOriginator
- PropertyFixed
Removes property from current WorkArea scope. Note that this operation
will not remove value from outer levels of context.
Parameters:
key
- May not be null. Throws:
NoWorkArea
- Thrown if there is no active WorkArea associated with the thread. NotOriginator
- Thrown if the operation is invoked against a WorkArea imported from another process. PropertyFixed
- Thrown if the property was set as fixed. java.lang.NullPointerException
- Thrown if the key is null.