apollo
Class HTTPRequest

java.lang.Object
  |
  +--apollo.HTTPRequest
All Implemented Interfaces:
java.io.Serializable

public class HTTPRequest
extends java.lang.Object
implements java.io.Serializable

This is the HTTPRequest object. It is used to hold information about a HTTPRequest and will be passed by PageBrokers. Copyright Joe Kislo, All Rights Reserved.

See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable headerElements
           
protected  java.util.Hashtable requestElements
           
protected  java.util.Hashtable requestFiles
           
protected  java.lang.String servletPath
           
 
Constructor Summary
HTTPRequest()
           
HTTPRequest(java.util.Hashtable hashElements)
           
HTTPRequest(HTTPRequest req)
           
HTTPRequest(javax.servlet.http.HttpServletRequest req)
           
 
Method Summary
 void deleteHeader(java.lang.String s)
          Deletes the supplied header key
 java.lang.String get(java.lang.String para)
          Fetches the first value stored in the HTTPRequest for the requested key.
 java.lang.String[] getArrayParameter(java.lang.String para)
          Fetches an array of the values stored in the HTTPRequest for the requested key.
 HTTPFile getFile(java.lang.String para)
          Fetches the first file stored in the HTTPRequest for the requested key.
 java.lang.String getHeader(java.lang.String s)
          Returns the value for the header key requested
 java.util.Enumeration getHeaderNames()
          Fetches an enumeration of the header names stored in this request
 java.lang.String getParameter(java.lang.String para)
          Fetches the first value stored in the HTTPRequest for the requested key.
 java.util.Hashtable getRequestHash()
          Returns the raw Hashtable holding the request elements
 java.util.Enumeration getRequestKeys()
          Get request keys
 java.lang.String getServletPath()
          This is usually a non-fully-qualified URL for the servlet.
 java.lang.String getValue(java.lang.String para)
          Fetches the first value stored in the HTTPRequest for the requested key.
 java.util.Vector getVectorParameter(java.lang.String para)
          Fetches a vector of the values stored in the HTTPRequest for the requested key.
 boolean hasKey(java.lang.String para)
          Tests for the existance of the requested key
 boolean hasValue(java.lang.String para)
          Tests for the existance of the requested key
 void putParameter(java.lang.String name, java.lang.String val)
          Sets a value in the HTTPRequest.
 void putParameter(java.lang.String name, java.lang.String[] val)
          Sets an array value in the HTTPRequest.
 void set(java.lang.String para, java.lang.String str)
          Sets a value in the HTTPRequest.
 void setFile(java.lang.String para, HTTPFile file)
          Sets a file valaue in the HTTPRequest.
 void setFile(java.lang.String para, HTTPFile[] files)
          Sets a set of file values in the HTTPRequest.
 void setHeader(java.lang.String key, java.lang.String value)
          Sets a value for the header key supplied
 void setParameter(java.lang.String para, java.lang.String val)
          Sets a value in the HTTPRequest.
 void setParameter(java.lang.String para, java.lang.String[] val)
          Sets an array value in the HTTPRequest.
 void setValue(java.lang.String para, java.lang.String str)
          Sets a value in the HTTPRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestElements

protected java.util.Hashtable requestElements

requestFiles

protected java.util.Hashtable requestFiles

servletPath

protected java.lang.String servletPath

headerElements

protected java.util.Hashtable headerElements
Constructor Detail

HTTPRequest

public HTTPRequest(javax.servlet.http.HttpServletRequest req)

HTTPRequest

public HTTPRequest(java.util.Hashtable hashElements)

HTTPRequest

public HTTPRequest()

HTTPRequest

public HTTPRequest(HTTPRequest req)
Method Detail

putParameter

public void putParameter(java.lang.String name,
                         java.lang.String val)
Sets a value in the HTTPRequest. Synonym for: setValue, putParameter, setParameter, put

putParameter

public void putParameter(java.lang.String name,
                         java.lang.String[] val)
Sets an array value in the HTTPRequest. Synonym for: setValue, putParameter, setParameter, put

getServletPath

public java.lang.String getServletPath()
This is usually a non-fully-qualified URL for the servlet. It is usually set by the JSDK if used.

getParameter

public java.lang.String getParameter(java.lang.String para)
Fetches the first value stored in the HTTPRequest for the requested key. Synonym for: get, getParameter, getValue

getVectorParameter

public java.util.Vector getVectorParameter(java.lang.String para)
Fetches a vector of the values stored in the HTTPRequest for the requested key.

getArrayParameter

public java.lang.String[] getArrayParameter(java.lang.String para)
Fetches an array of the values stored in the HTTPRequest for the requested key.

setParameter

public void setParameter(java.lang.String para,
                         java.lang.String val)
Sets a value in the HTTPRequest. Synonym for: setValue, putParameter, setParameter, put

setParameter

public void setParameter(java.lang.String para,
                         java.lang.String[] val)
Sets an array value in the HTTPRequest. Synonym for: setValue, putParameter, setParameter, put,

getValue

public java.lang.String getValue(java.lang.String para)
Fetches the first value stored in the HTTPRequest for the requested key. Synonym for: get, getParameter, getValue

setValue

public void setValue(java.lang.String para,
                     java.lang.String str)
Sets a value in the HTTPRequest. Synonym for: setValue, putParameter, setParameter, put

getFile

public HTTPFile getFile(java.lang.String para)
Fetches the first file stored in the HTTPRequest for the requested key.

setFile

public void setFile(java.lang.String para,
                    HTTPFile file)
Sets a file valaue in the HTTPRequest.

setFile

public void setFile(java.lang.String para,
                    HTTPFile[] files)
Sets a set of file values in the HTTPRequest.

get

public java.lang.String get(java.lang.String para)
Fetches the first value stored in the HTTPRequest for the requested key. Synonym for: get, getParameter, getValue

set

public void set(java.lang.String para,
                java.lang.String str)
Sets a value in the HTTPRequest. Synonym for: setValue, putParameter, setParameter, put

hasValue

public boolean hasValue(java.lang.String para)
Tests for the existance of the requested key

hasKey

public boolean hasKey(java.lang.String para)
Tests for the existance of the requested key

getHeaderNames

public java.util.Enumeration getHeaderNames()
Fetches an enumeration of the header names stored in this request

getHeader

public java.lang.String getHeader(java.lang.String s)
Returns the value for the header key requested

setHeader

public void setHeader(java.lang.String key,
                      java.lang.String value)
Sets a value for the header key supplied

deleteHeader

public void deleteHeader(java.lang.String s)
Deletes the supplied header key

getRequestHash

public java.util.Hashtable getRequestHash()
Returns the raw Hashtable holding the request elements

getRequestKeys

public java.util.Enumeration getRequestKeys()
Get request keys