mx4j.adaptor.http
Class DefaultProcessor
java.lang.Object
|
+--mx4j.adaptor.http.DefaultProcessor
- All Implemented Interfaces:
- ProcessorMBean
- public class DefaultProcessor
- extends java.lang.Object
- implements ProcessorMBean
DefaultPostProcessor doesn't alter the result, just publising the xml file
- Version:
- $Revision: 1.5 $
- Author:
- Carlos Quiroz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultProcessor
public DefaultProcessor()
getName
public java.lang.String getName()
- Specified by:
getName
in interface ProcessorMBean
writeResponse
public void writeResponse(HttpOutputStream out,
HttpInputStream in,
org.w3c.dom.Document document)
throws java.io.IOException
- Description copied from interface:
ProcessorMBean
- The method will process the result string and produce an output. The
implementor is also responsible to set the mime type, response code and
send the headers before answering as follow:
out.setCode(HttpConstants.STATUS_OKAY);
out.setHeader("Content-type", "text/html");
out.sendHeaders();
out.write("some text");
- Specified by:
writeResponse
in interface ProcessorMBean
- Following copied from interface:
mx4j.adaptor.http.ProcessorMBean
- Parameters:
out
- The output streamin
- The input streamdocument
- A document containing the data
writeError
public void writeError(HttpOutputStream out,
HttpInputStream in,
java.lang.Exception e)
throws java.io.IOException
- Description copied from interface:
ProcessorMBean
- The method will process the result exception and produce output. The
implementor is also responsible to set the mime type, response code and
send the headers before answering as follow:
out.setCode(HttpConstants.STATUS_OKAY);
out.setHeader("Content-type", "text/html");
out.sendHeaders();
out.write("some text");
- Specified by:
writeError
in interface ProcessorMBean
- Following copied from interface:
mx4j.adaptor.http.ProcessorMBean
- Parameters:
out
- The output streamin
- The input streame
- The exception to be reported
preProcess
public java.lang.String preProcess(java.lang.String path)
- Description copied from interface:
ProcessorMBean
- Preprocess a path and return a replacement path. For instance the / path
could be replaced by the server path
- Specified by:
preProcess
in interface ProcessorMBean
- Following copied from interface:
mx4j.adaptor.http.ProcessorMBean
- Parameters:
path
- The original path- Returns:
- the replacement path. If not modification the path param should
be returned
notFoundElement
public java.lang.String notFoundElement(java.lang.String path,
HttpOutputStream out,
HttpInputStream in)
throws java.io.IOException,
HttpException
- Description copied from interface:
ProcessorMBean
- Let the processor load internally a not found element. This can be used
to load images, stylesheets and so on. If return is not null, the path is
processed
- Specified by:
notFoundElement
in interface ProcessorMBean
- Following copied from interface:
mx4j.adaptor.http.ProcessorMBean
- Parameters:
path
- The request elementout
- The output streamin
- The input stream
print
protected void print(java.io.PrintWriter out,
org.w3c.dom.Node node)
sortAttributes
protected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
- Returns a sorted list of attributes.
- Parameters:
attrs
- Description of Parameter- Returns:
- Description of the Returned Value
- Since:
-
normalize
protected java.lang.String normalize(java.lang.String s)
- Normalizes the given string.
- Parameters:
s
- Description of Parameter- Returns:
- Description of the Returned Value
- Since:
-
Copyright © 2001-2002 MX4J Team. All Rights Reserved.