public abstract class ContextImpl extends java.lang.Object implements Context
We provide this abstract class for other implementations to use so that they can simply add fields and operations on them. To be usable by the context manager, the subclasses must define CleanupOnError and call super() in any constructor.
Contexts assist in cleanup when errors are caught in the outer block.
Contexts implement the sanity interface to check and provide information about their contents.
| Modifier and Type | Field and Description |
|---|---|
private ContextManager |
myContextManager |
private java.lang.String |
myIdName |
| Modifier | Constructor and Description |
|---|---|
protected |
ContextImpl(ContextManager cm,
java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.StringBuffer |
appendErrorInfo() |
ContextManager |
getContextManager()
Returns the context manager that has stored this
context in its stack.
|
java.lang.String |
getIdName()
Returns the current id name associated
with this context.
|
boolean |
isLastHandler(int severity)
Return whether or not this context is the "last" handler for a
the specified severity level.
|
void |
popMe()
Pop myself of the context stack.
|
void |
pushMe()
Push myself onto my context stack.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanupOnErrorprivate final java.lang.String myIdName
private final ContextManager myContextManager
protected ContextImpl(ContextManager cm, java.lang.String id)
public final ContextManager getContextManager()
ContextgetContextManager in interface ContextContext.getContextManager()public final java.lang.String getIdName()
ContextA default Id name should be defined in each specific context interface as a static final field with the name CONTEXT_ID. For example, see org.apache.derby.iapi.sql.compile.CompilerContext.CONTEXT_ID.
getIdName in interface ContextContext.getIdName()public final void pushMe()
Contextpublic final void popMe()
ContextpopMe in interface ContextContext.popMe()public boolean isLastHandler(int severity)
ContextisLastHandler in interface ContextContext.isLastHandler(int)public java.lang.StringBuffer appendErrorInfo()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.