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, wait
cleanupOnError
private final java.lang.String myIdName
private final ContextManager myContextManager
protected ContextImpl(ContextManager cm, java.lang.String id)
public final ContextManager getContextManager()
Context
getContextManager
in interface Context
Context.getContextManager()
public final java.lang.String getIdName()
Context
A 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 Context
Context.getIdName()
public final void pushMe()
Context
public final void popMe()
Context
popMe
in interface Context
Context.popMe()
public boolean isLastHandler(int severity)
Context
isLastHandler
in interface Context
Context.isLastHandler(int)
public java.lang.StringBuffer appendErrorInfo()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.