|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.pipeline.controller.Process
Base class for all pipeline process definitions. To create a custom pipeline process, you need to create a class which extends from the Process class. At the minimum, every custom process should overwrite the initialize() and execute() method of this class. If the custom process takes SAX events as input, it should overwrite the SAXContentHandler() method to return the appropriate ContentHandler which will handle incoming SAX events.
Field Summary |
Fields inherited from interface oracle.xml.pipeline.controller.PipelineConstants |
COMPSTREAMRESULT, COMPSTREAMSOURCE, DOCFRAG, DOCUMENT, DOMRESULT, DOMSOURCE, ELEMENT, PROCESS_WAITING, SAXRESULT, SAXSOURCE, STREAMRESULT, STREAMSOURCE |
Method Summary | |
void |
convertFromDOM(DOMResult res, Output output) Should be called by the Process which outputs DOM. |
void |
convertFromSAX(SAXResult result, Output output) Should be called by the Process which outputs SAX events. |
void |
convertFromStream(StreamResult res, Output output) Should be called by the Process which outputs xml as Stream. |
void |
error(int type, java.lang.Exception e) Called by a custom Process whenever an error occurs. |
protected void |
execute() Does nothing by default, to be implemented by classes extending from the Process class. |
XMLDocument |
getErrorDocument(java.lang.String errorName, boolean convert) Get the error element as an XML Document tree |
Source |
getErrorSource(java.lang.String errorName) Retrieve the error element as Source |
java.io.InputStream |
getErrorStream(java.lang.String errorName, boolean convert) Get the error element as an Input stream for reading error. |
void |
getErrorStream(java.lang.String errorName, java.io.OutputStream out, boolean convert) Write the error element to the outputstream provided. |
java.lang.Object |
getInParamValue(java.lang.String name) Get an input param value based on its name |
Input |
getInput(java.lang.String inputName) Retrieve the Input object by name |
java.lang.Object |
getOutParamValue(java.lang.String name) Get the output param value based on its name |
Output |
getOutput(java.lang.String outputName) Retrieve a particular output by name |
java.io.OutputStream |
getOutputStream(java.lang.String outputName) Get the output stream for printing to a specific output |
java.io.Writer |
getOutputWriter(java.lang.String outputName) Get the output writer for writing to a specific output |
ContentHandler |
getSAXContentHandler(Output out) Get the ContentHandler which will handle the sax events generated. |
ErrorHandler |
getSAXErrorHandler(Output out) Get the SAX ErrorHandler which will handle the sax error events generated. |
void |
info(java.lang.String msg) Called by a Process to report an informational message and continue with execution. |
protected void |
initialize() Does nothing by default, to be implemented by the classes extending from the Process class. |
protected ContentHandler |
SAXContentHandler() Each Process which handles SAX as input should overwrite this method to return the ContentHandler. |
protected ErrorHandler |
SAXErrorHandler() Each Process produces SAX events as output can overwrite this method to return the ErrorHandler. |
void |
setOutputResult(java.lang.String outputName, Result res) All user defined processes (extending from Process) need to create a Result object and set it in the output using this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
Methods inherited from interface org.xml.sax.ErrorHandler |
error, fatalError, warning |
Method Detail |
protected void initialize()
public final Input getInput(java.lang.String inputName)
inputName
- input name as Stringpublic Output getOutput(java.lang.String outputName)
outputName
- as a Stringpublic final java.lang.Object getInParamValue(java.lang.String name)
name
- name of InParam as Stringpublic final java.lang.Object getOutParamValue(java.lang.String name)
name
- OutParam name as Stringprotected void execute() throws PipelineException
PipelineException
public final void setOutputResult(java.lang.String outputName, Result res)
outputName
- as Stringres
- Result objectpublic final java.io.OutputStream getOutputStream(java.lang.String outputName) throws java.io.FileNotFoundException, java.io.IOException
outputName
- name of outputjava.io.FileNotFoundException
java.io.IOException
public final java.io.Writer getOutputWriter(java.lang.String outputName) throws java.io.FileNotFoundException, java.io.IOException
outputName
- name of outputjava.io.FileNotFoundException
java.io.IOException
public Source getErrorSource(java.lang.String errorName)
errorName
- name of error from pipeline documentpublic void getErrorStream(java.lang.String errorName, java.io.OutputStream out, boolean convert) throws java.io.IOException
errorName
- name of error elementout
- outputstream to write toconvert
- convert from DOM to stream or notjava.io.IOException
- while writing to outputstreampublic final java.io.InputStream getErrorStream(java.lang.String errorName, boolean convert) throws java.io.IOException
errorName
- error element name as Stringconvert
- convert from Node to InputStream or notjava.io.IOException
- reading from error elementpublic XMLDocument getErrorDocument(java.lang.String errorName, boolean convert) throws SAXException, XMLParseException, java.io.IOException
errorName
- error element name as Stringconvert
- convert from stream to DOM if necessarySAXException
- while parsingXMLParseException
- while parsingjava.io.IOException
public final void error(int type, java.lang.Exception e) throws PipelineException
type
- error type as defined in PipelineConstantse
- exceptionPipelineException
public void info(java.lang.String msg)
msg
- - message to reportpublic final ContentHandler getSAXContentHandler(Output out) throws PipelineException
out
- the Output object which is the SAX sourcePipelineException
public final ErrorHandler getSAXErrorHandler(Output out)
out
- Output object which is the SAX sourcePipelineException
protected ContentHandler SAXContentHandler() throws PipelineException
PipelineException
protected ErrorHandler SAXErrorHandler()
public final void convertFromSAX(SAXResult result, Output output) throws java.io.FileNotFoundException, java.io.IOException
result
- the process result as a SAXResult objectoutput
- output object to be associated with the SAX, to be piped into the input of the next process in pipelineFileNoFoundException
java.io.IOException
java.io.FileNotFoundException
public final void convertFromDOM(DOMResult res, Output output) throws SAXException, java.io.IOException, PipelineException
res
- the process result as a DOMResult objectoutput
- output object associated with result, to be piped to the next process in pipelineSAXException
java.io.IOException
PipelineException
public final void convertFromStream(StreamResult res, Output output) throws SAXException, java.io.IOException, PipelineException
res
- the process result as a StreamResult objectoutput
- output object to be associated with the result, to be piped to the input of the next process in the pipelineSAXException
java.io.IOException
PipelineException
|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |