simple.http
Interface RequestLine

All Known Subinterfaces:
Request
All Known Implementing Classes:
FilterRequest

public interface RequestLine

The RequestLine is used to represent a HTTP request line. The methods provided for this can be used to provide easy access to the components of a HTTP request line. For the syntax of a HTTP request line see RFC 2616.

Author:
Niall Gallagher

Method Summary
 int getMajor()
          This can be used to get the major number from a HTTP version.
 java.lang.String getMethod()
          This can be used to get the HTTP method for this request.
 int getMinor()
          This can be used to get the major number from a HTTP version.
 java.lang.String getURI()
          This can be used to get the URI specified for this HTTP request.
 void setMajor(int major)
          This can be used to specify the major version for the HTTP request.
 void setMethod(java.lang.String method)
          This is used to set the method for this HTTP request object.
 void setMinor(int minor)
          This can be used to specify the minor version for the HTTP request.
 void setURI(java.lang.String uri)
          This can be used to set the URI for this HTTP request.
 

Method Detail

getURI

java.lang.String getURI()
This can be used to get the URI specified for this HTTP request. This corrosponds to the /index part of a http://www.domain.com/index URL but may contain the full URL. This can be set using setURI.

Returns:
the URI that this HTTP request is targeting

setURI

void setURI(java.lang.String uri)
This can be used to set the URI for this HTTP request. The getURI will return the String entered which can be a full HTTP URL or a relative path URL.

Parameters:
uri - the URI that this HTTP request is to use

getMethod

java.lang.String getMethod()
This can be used to get the HTTP method for this request. The HTTP specification RFC 2616 specifies the HTTP request methods in section 9, Method Definitions.

Returns:
the request method for this request

setMethod

void setMethod(java.lang.String method)
This is used to set the method for this HTTP request object. For a list of possible string values that can be used see RFC 2616 section 9, Method Definitions.

Parameters:
method - the desired method for this

getMajor

int getMajor()
This can be used to get the major number from a HTTP version. The major version corrosponds to the major type that is the 1 of a HTTP/1.0 version string.

Returns:
the major version number for the request

setMajor

void setMajor(int major)
This can be used to specify the major version for the HTTP request. Specifying the major version has little effect on the semantics of the request.

Parameters:
major - this is the major number desired

getMinor

int getMinor()
This can be used to get the major number from a HTTP version. The major version corrosponds to the major type that is the 0 of a HTTP/1.0 version string.

Returns:
the major version number

setMinor

void setMinor(int minor)
This can be used to specify the minor version for the HTTP request. Specifying the minor version will effect the manner in which the request is processed.

Parameters:
minor - this is the minor number desired