org.ferris.net.runner
Class HttpRequestParser

java.lang.Object
  extended by org.ferris.net.runner.HttpRequestParser

public class HttpRequestParser
extends Object

The purpose of this class is to take a relative URL like this "/some/kind/of/path/to/resource.jsp?fname=?&lname=?" and break it into a resource and a list of parameter names where resource = "/some/kind/of/path/to/resource.jsp" and parameter names = ["fname","lname"]. The resource and list of parameter names will be used by the HttpRequestRunner to make the request to the correct resource and to appropriately set the request parameters.

Author:
Mike Remijan

Constructor Summary
HttpRequestParser(String request)
          Splits the request in a String representing the resource and a List representing the names of the request parameters.
 
Method Summary
 List<String> getParameters()
          Return ["fname","lname"] of "/some/kind/of/path/to/resource.jsp?fname=?&lname=?"
 String getResource()
          Return "/some/kind/of/path/to/resource.jsp" of "/some/kind/of/path/to/resource.jsp?fname=?&lname=?"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestParser

public HttpRequestParser(String request)
Splits the request in a String representing the resource and a List representing the names of the request parameters. So, given "/some/kind/of/path/to/resource.jsp?fname=?&lname=?" resource="/some/kind/of/path/to/resource.jsp" and list=["fname","lname"]

Parameters:
request -
Method Detail

getResource

public String getResource()
Return "/some/kind/of/path/to/resource.jsp" of "/some/kind/of/path/to/resource.jsp?fname=?&lname=?"


getParameters

public List<String> getParameters()
Return ["fname","lname"] of "/some/kind/of/path/to/resource.jsp?fname=?&lname=?"



Copyright © Jun 11, 2009-2011 The Ferris Foundation. All Rights Reserved.