Devsphere.com


com.devsphere.xml.taglib.process.parse
Class Worker

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.devsphere.xml.taglib.process.parse.Worker
All Implemented Interfaces:
java.lang.Runnable

public class Worker
extends java.lang.Thread

This thread class does the parsing of the XML documents.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Worker(org.xml.sax.InputSource source, Handler handler, boolean validating, AbstractLogger logger, javax.servlet.jsp.PageContext context)
          Initializes the parsing thread.
 
Method Summary
 java.lang.Exception getException()
          Returns the exception that interrupted the parsing or null if the parsing was completed successfully.
 void run()
          Creates the builder object and calls its parse() method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Worker

public Worker(org.xml.sax.InputSource source,
              Handler handler,
              boolean validating,
              AbstractLogger logger,
              javax.servlet.jsp.PageContext context)
Initializes the parsing thread.

Parameters:
source - the XML input source that must be parsed
handler - SAX event handler that is also SAXDOMIX controller
validating - a flag indicating if the XML content should be validated by the XML parser
logger - used for logging error messages and exceptions
context - the JSP PageContext object
Method Detail

run

public void run()
Creates the builder object and calls its parse() method.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getException

public java.lang.Exception getException()
Returns the exception that interrupted the parsing or null if the parsing was completed successfully.

Returns:
a parsing error or null

 Devsphere.com