ibspan.tss.agents.pra.server.http
Class HttpRequestHdr

java.lang.Object
  extended by ibspan.tss.agents.pra.server.http.HttpRequestHdr

public class HttpRequestHdr
extends Object

Parses and stores a http server request.

Author:
Pawel Kaczmarek, Sherman Janes

Field Summary
 String accept
          A list of mime types the client can accept.
 String authorization
          The clients authorization.
 int contentLength
          The length of the content following the header.
 String contentType
          The type of content following the request header.
 String ifModifiedSince
          A internet address date of the remote copy.
 String method
          Http Request method.
 int oldContentLength
          The content length of a remote copy of the requested object.
 boolean pragmaNoCache
          Indicates that no cached versions of the requested object are to be sent.
 String queryString
           
 String referer
          The requesting documents that contained the url link.
 String unrecognized
          Anything in the header that was unrecognized by this class.
 String uri
           
 String url
          The requested url.
 String userAgent
          The client's browser's name.
 String version
          Version of http being used.
 
Constructor Summary
HttpRequestHdr()
           
 
Method Summary
 Map<String,String> getParameters()
           
 String getQueryString()
           
 String getUri()
           
 void parse(InputStream In)
          Parses a http header from a stream.
 void setQueryString(String queryString)
           
 void setUri(String uri)
           
 String toString()
          (Re)builds the header in a string.
 String toString(boolean sendUnknowen)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

method

public String method
Http Request method. Such as get or post.


url

public String url
The requested url. The universal resource locator that hopefully uniquely describes the object or service the client is requesting.


uri

public String uri

queryString

public String queryString

version

public String version
Version of http being used. Such as HTTP/1.0


userAgent

public String userAgent
The client's browser's name.


referer

public String referer
The requesting documents that contained the url link.


ifModifiedSince

public String ifModifiedSince
A internet address date of the remote copy.


accept

public String accept
A list of mime types the client can accept.


authorization

public String authorization
The clients authorization. Don't belive it.


contentType

public String contentType
The type of content following the request header. Normally there is no content and this is blank, however the post method usually does have a content and a content length.


contentLength

public int contentLength
The length of the content following the header. Usually blank.


oldContentLength

public int oldContentLength
The content length of a remote copy of the requested object.


unrecognized

public String unrecognized
Anything in the header that was unrecognized by this class.


pragmaNoCache

public boolean pragmaNoCache
Indicates that no cached versions of the requested object are to be sent. Usually used to tell proxy not to send a cached copy. This may also effect servers that are front end for data bases.

Constructor Detail

HttpRequestHdr

public HttpRequestHdr()
Method Detail

parse

public void parse(InputStream In)
           throws HttpHeaderParseException
Parses a http header from a stream.

Parameters:
In - The stream to parse.
Throws:
HttpHeaderParseException

toString

public String toString(boolean sendUnknowen)

toString

public String toString()
(Re)builds the header in a string.

Overrides:
toString in class Object
Returns:
The header in a string.

getQueryString

public String getQueryString()
Returns:
Returns the queryString.

setQueryString

public void setQueryString(String queryString)
Parameters:
queryString - The queryString to set.

getUri

public String getUri()
Returns:
Returns the uri.

setUri

public void setUri(String uri)
Parameters:
uri - The uri to set.

getParameters

public Map<String,String> getParameters()