com.flat502.rox.server
Class CgiRequestUnmarshaller

java.lang.Object
  extended by com.flat502.rox.server.HttpRequestUnmarshaller
      extended by com.flat502.rox.server.CgiRequestUnmarshaller

public class CgiRequestUnmarshaller
extends HttpRequestUnmarshaller

An HttpRequestUnmarshaller implementation that maps CGI-style HTTP GET requests onto XML-RPC methods.

For specifics regarding the mapping of URIs and CGI parameters see the MethodCallURI and CgiMethodCallUnmarshaller classes, respectively.


Constructor Summary
CgiRequestUnmarshaller()
           
 
Method Summary
 RpcCall unmarshal(HttpRequestBuffer request, MethodCallUnmarshallerAid aid)
           
protected  void validateRequest(HttpRequestBuffer httpReq)
          Validate an XML-RPC HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CgiRequestUnmarshaller

public CgiRequestUnmarshaller()
Method Detail

unmarshal

public RpcCall unmarshal(HttpRequestBuffer request,
                         MethodCallUnmarshallerAid aid)
                  throws java.lang.Exception
Specified by:
unmarshal in class HttpRequestUnmarshaller
Throws:
java.lang.Exception

validateRequest

protected void validateRequest(HttpRequestBuffer httpReq)
                        throws HttpBufferException
Validate an XML-RPC HTTP request.

This implementation checks for the following cases:

Parameters:
httpReq - The complete HTTP message to validate.
Throws:
MethodNotAllowedException - if the HTTP method is anything other than POST.
InvalidHeaderException - if Content-Length is not present and set to zero.
HttpBufferException - Implementations may throw other exceptions if implementation-specific validation fails.