org.apache.log
public class ContextStack extends Object
Deprecated: This class has been deprecated as it encouraged use of bad design practices. Use org.apache.log.ContextMap instead.
The ContextStack records the nested context of an application. The context is an application defined characteristeric. For instance a webserver context may be defined as the session that is currently used to connect to server. A application may have context defined by current thread. A applet may have it's context defined by the name of the applet etc.Method Summary | |
---|---|
void | clear()
Empty the context stack.
|
Object | get(int index)
Get the context at a particular depth.
|
static ContextStack | getCurrentContext()
Get the Current ContextStack.
|
int | getSize()
Get the number of contexts in stack.
|
Object | pop()
Remove a context from top of stack and return it.
|
void | push(Object context)
Push the context onto top of context stack.
|
void | set(ContextStack stack)
Set the current ContextSet to be equl to other ContextStack.
|
String | toString()
Format context stack into a string.
|
String | toString(int count)
Format context stack into a string.
|
Parameters: index the depth of the context to retrieve
Returns: the context
Returns: the current ContextStack
Returns: the number of contexts in stack
Returns: the context that was on top of stack
Parameters: context the context to place on stack
Parameters: stack the value to copy
Returns: the string describing context stack
Returns: the string describing context stack