public class DefaultProcessor extends java.lang.Object implements ProcessorMBean
Constructor and Description |
---|
DefaultProcessor() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
protected java.lang.String |
normalize(java.lang.String s)
Normalizes the given string.
|
java.lang.String |
notFoundElement(java.lang.String path,
HttpOutputStream out,
HttpInputStream in)
Let the processor load internally a not found element.
|
java.lang.String |
preProcess(java.lang.String path)
Preprocess a path and return a replacement path.
|
protected void |
print(java.io.PrintWriter out,
org.w3c.dom.Node node) |
protected org.w3c.dom.Attr[] |
sortAttributes(org.w3c.dom.NamedNodeMap attrs)
Returns a sorted list of attributes.
|
void |
writeError(HttpOutputStream out,
HttpInputStream in,
java.lang.Exception e)
The method will process the result exception and produce output.
|
void |
writeResponse(HttpOutputStream out,
HttpInputStream in,
org.w3c.dom.Document document)
The method will process the result string and produce an output.
|
public java.lang.String getName()
getName
in interface ProcessorMBean
public void writeResponse(HttpOutputStream out, HttpInputStream in, org.w3c.dom.Document document) throws java.io.IOException
ProcessorMBean
out.setCode(HttpConstants.STATUS_OKAY);
out.setHeader("Content-type", "text/html");
out.sendHeaders();
out.write("some text");
writeResponse
in interface ProcessorMBean
out
- The output streamin
- The input streamdocument
- A document containing the datajava.io.IOException
public void writeError(HttpOutputStream out, HttpInputStream in, java.lang.Exception e) throws java.io.IOException
ProcessorMBean
out.setCode(HttpConstants.STATUS_OKAY);
out.setHeader("Content-type", "text/html");
out.sendHeaders();
out.write("some text");
writeError
in interface ProcessorMBean
out
- The output streamin
- The input streame
- The exception to be reportedjava.io.IOException
public java.lang.String preProcess(java.lang.String path)
ProcessorMBean
preProcess
in interface ProcessorMBean
path
- The original pathpublic java.lang.String notFoundElement(java.lang.String path, HttpOutputStream out, HttpInputStream in) throws java.io.IOException, HttpException
ProcessorMBean
notFoundElement
in interface ProcessorMBean
path
- The request elementout
- The output streamin
- The input streamjava.io.IOException
HttpException
protected void print(java.io.PrintWriter out, org.w3c.dom.Node node)
protected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
attrs
- Description of Parameterprotected java.lang.String normalize(java.lang.String s)
s
- Description of Parameter