net.sf.j2ep.factories
Class ResponseHandlerFactory

java.lang.Object
  extended by net.sf.j2ep.factories.ResponseHandlerFactory

public class ResponseHandlerFactory
extends java.lang.Object

A factory creating ResponseHandlers. This factory is used to get the handler for each request, it has a list of methods it can handle and will throw a MethodNotAllowedException when it can't handle a method.

Author:
Anders Nyman

Constructor Summary
ResponseHandlerFactory()
           
 
Method Summary
static ResponseHandler createResponseHandler(org.apache.commons.httpclient.HttpMethod method)
          Checks the method being received and created a suitable ResponseHandler for this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseHandlerFactory

public ResponseHandlerFactory()
Method Detail

createResponseHandler

public static ResponseHandler createResponseHandler(org.apache.commons.httpclient.HttpMethod method)
                                             throws MethodNotAllowedException
Checks the method being received and created a suitable ResponseHandler for this method.

Parameters:
method - Method to handle
Returns:
The handler for this response
Throws:
MethodNotAllowedException - If no method could be choose this exception is thrown