Berkeley DB XML
version 2.5.16

com.sleepycat.dbxml
Class XmlDebugListener

java.lang.Object
  extended by com.sleepycat.dbxml.XmlDebugListener

public class XmlDebugListener
extends Object

The XmlDebugListener class allows the user to track the progress of a query as it executes. The XmlStackFrame argument to the methods of this class gives access to the point in the query plan corresponding to the current execution state, as well as the execution stack trace and parts of the dynamic context for that stack frame. During evaluation of a query, BDB XML will evaluate the sub-expressions of the query. The start(com.sleepycat.dbxml.XmlStackFrame) method is called when evaluation of a sub-expression starts and the end(com.sleepycat.dbxml.XmlStackFrame) method is called when it ends. This can occur more than once for the same sub-expression if the expression is in a loop or in a function that is called more than once. When evaluating a sub-expression BDB XML calls into that sub-expression a number of times to retrieve parts of its result. For eager evaluation, this will happen only once, but for lazy evalution this will happen once per item in the result. The enter(com.sleepycat.dbxml.XmlStackFrame) method is called when BDB XML requests results from a sub-expression and the exit(com.sleepycat.dbxml.XmlStackFrame) method is called when the results requested have been calculated.


Constructor Summary
XmlDebugListener()
           
 
Method Summary
 void delete()
          Releases the native resources associated with this object
 void end(XmlStackFrame stack)
          This method is called when BDB XML ends evaluation of a sub-expression.
 void enter(XmlStackFrame stack)
          This method is called when BDB XML requests results from a sub-expression.
 void error(XmlException error, XmlStackFrame stack)
          This method is called if an error occurs during query evaluation.
 void exit(XmlStackFrame stack)
          This method is called when a sub-expression has finished calculating the results requested.
 void start(XmlStackFrame stack)
          This method is called when BDB XML starts evaluation of a sub-expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDebugListener

public XmlDebugListener()
Method Detail

delete

public void delete()
Releases the native resources associated with this object


start

public void start(XmlStackFrame stack)
           throws XmlException
This method is called when BDB XML starts evaluation of a sub-expression.

Parameters:
stack - The XmlStackFrame for the current execution context.
Throws:
XmlException

end

public void end(XmlStackFrame stack)
         throws XmlException
This method is called when BDB XML ends evaluation of a sub-expression.

Parameters:
stack - The XmlStackFrame for the current execution context.
Throws:
XmlException

enter

public void enter(XmlStackFrame stack)
           throws XmlException
This method is called when BDB XML requests results from a sub-expression.

Parameters:
stack - The XmlStackFrame for the current execution context.
Throws:
XmlException

exit

public void exit(XmlStackFrame stack)
          throws XmlException
This method is called when a sub-expression has finished calculating the results requested.

Parameters:
stack - The XmlStackFrame for the current execution context.
Throws:
XmlException

error

public void error(XmlException error,
                  XmlStackFrame stack)
           throws XmlException
This method is called if an error occurs during query evaluation. It is normal to throw the XmlException argument at the end of an implementation of the method.

Parameters:
error - The XmlException representing the error.
stack - The XmlStackFrame for the current execution context.
Throws:
XmlException

Berkeley DB XML
version 2.5.16

Copyright (c) 1996,2009 Oracle. All rights reserved.