## mx4j.tools.adaptor.http
Interface ProcessorMBean

All Known Subinterfaces:
  XSLTProcessorMBean

All Known Implementing Classes:
  DefaultProcessor, XSLTProcessor

public interface ProcessorMBean

Processor ManagementBean, just defines a generic description

Version:
  $Revision: 1.3 $

Method Summary
`java.lang.String` `getName()`
`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.
`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.

Method Detail

### getName

    public java.lang.String getName()

### writeResponse

    public void writeResponse(HttpOutputStream out,
                              HttpInputStream in,
                              org.w3c.dom.Document document)
                       throws java.io.IOException

  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");`

  Parameters:
    `out` - The output stream
    `in` - The input stream
    `document` - A document containing the data
  Throws:
    `java.io.IOException`

### writeError

    public void writeError(HttpOutputStream out,
                           HttpInputStream in,
                           java.lang.Exception e)
                    throws java.io.IOException

  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");`

  Parameters:
    `out` - The output stream
    `in` - The input stream
    `e` - The exception to be reported
  Throws:
    `java.io.IOException`

### preProcess

    public java.lang.String preProcess(java.lang.String path)

  Preprocess a path and return a replacement path. For instance the / path could be replaced by the server path

  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

  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

  Parameters:
    `path` - The request element
    `out` - The output stream
    `in` - The input stream
  Throws:
    `java.io.IOException`
    `HttpException`

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.