net.sf.j2ep.factories
Class RequestHandlerFactory

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

public class RequestHandlerFactory
extends java.lang.Object

A factory creating RequestHandlers. 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
RequestHandlerFactory()
           
 
Method Summary
static RequestHandler createRequestMethod(java.lang.String method)
          Selects one suitable RequestMethod from the HashMap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestHandlerFactory

public RequestHandlerFactory()
Method Detail

createRequestMethod

public static RequestHandler createRequestMethod(java.lang.String method)
                                          throws MethodNotAllowedException
Selects one suitable RequestMethod from the HashMap.

Parameters:
method - The method of this request
Returns:
A RequestHandler that can handle this request
Throws:
MethodNotAllowedException - If there is no RequestHandler available an exception will be thrown