Class AdaptiveMethodFactory

java.lang.Object
ee.jakarta.tck.ws.rs.jaxrs21.ee.patch.server.AdaptiveMethodFactory

public class AdaptiveMethodFactory extends Object
Simple factory class which returns HttpMethod implementations based on a request line.

For example, a request line of GET /index.jsp HTTP/1.0 would return an HttpMethod implementation that handles GET requests using HTTP/1.0.

  • Method Details

    • getMethodMap

      public static final Map<String,Class<? extends org.apache.commons.httpclient.HttpMethodBase>> getMethodMap()
    • getInstance

      public static org.apache.commons.httpclient.HttpMethod getInstance(String request)
      Returns the approriate request method based on the provided request string. The request must be in the format of METHOD URI_PATH HTTP_VERSION, i.e. GET /index.jsp HTTP/1.1.
      Returns:
      HttpMethod based in request.