org.xmlecho.palomar
Interface XProcessor

All Known Implementing Classes:
XProcessorImpl

public interface XProcessor

The top level interface to an ECHO Processor, which can operate either in server mode, client mode or both.

In server mode, one typically obtains an ECHO request from a stream. Obtain an XMLReader for that stream, perhaps from the Transformation service, and then evaluate the request


Method Summary
 ECHORequest compile(org.xml.sax.XMLReader reader, org.xml.sax.InputSource isrc)
           
 ECHOContext createContext()
          create an initial context for a request
 void eval(ECHOContext context, ECHORequest request, org.xml.sax.ContentHandler responseTarget)
          evaluate the request, under the given context, returning the result as a stream of SAX events to responseTarget
 void eval(ECHOContext ctx, org.xml.sax.XMLReader reader, org.xml.sax.InputSource isrc, org.xml.sax.ContentHandler responseTarget)
          evaluate the request, under the given context, returning the result as a stream of SAX events to responseTarget
 int getActiveProcessCount()
          returns the number of ECHO processes which are being processed by instances of this class at this moment
 void interruptProcess(java.lang.String processName, java.lang.String processId)
          interrupts a running process
 void listProcesses(org.xml.sax.ContentHandler ch)
          lists the running processes by emitting a SAX event stream to the target ContentHandler
 void setThreadProperty(java.lang.String propName, java.lang.Object value)
          record state information for a thread
 

Method Detail

createContext

public ECHOContext createContext()
create an initial context for a request


eval

public void eval(ECHOContext context,
                 ECHORequest request,
                 org.xml.sax.ContentHandler responseTarget)
          throws java.lang.Exception
evaluate the request, under the given context, returning the result as a stream of SAX events to responseTarget

Throws:
java.lang.Exception

compile

public ECHORequest compile(org.xml.sax.XMLReader reader,
                           org.xml.sax.InputSource isrc)
                    throws TransformException,
                           org.xml.sax.SAXException,
                           java.io.IOException
Throws:
TransformException
org.xml.sax.SAXException
java.io.IOException

eval

public void eval(ECHOContext ctx,
                 org.xml.sax.XMLReader reader,
                 org.xml.sax.InputSource isrc,
                 org.xml.sax.ContentHandler responseTarget)
          throws java.lang.Exception
evaluate the request, under the given context, returning the result as a stream of SAX events to responseTarget

Throws:
java.lang.Exception

getActiveProcessCount

public int getActiveProcessCount()
returns the number of ECHO processes which are being processed by instances of this class at this moment


listProcesses

public void listProcesses(org.xml.sax.ContentHandler ch)
                   throws org.xml.sax.SAXException
lists the running processes by emitting a SAX event stream to the target ContentHandler

Throws:
org.xml.sax.SAXException

interruptProcess

public void interruptProcess(java.lang.String processName,
                             java.lang.String processId)
                      throws java.lang.Exception
interrupts a running process

Throws:
java.lang.Exception

setThreadProperty

public void setThreadProperty(java.lang.String propName,
                              java.lang.Object value)
record state information for a thread