|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object seda.sandStorm.core.TimeStampedEvent seda.sandStorm.lib.http.httpRequest
public class httpRequest
This class represents a single HTTP client request.
Field Summary | |
---|---|
private httpConnection |
conn
|
private static boolean |
DEBUG
|
private java.util.Hashtable |
header
|
private int |
httpver
|
static int |
HTTPVER_09
getHttpVer() code corresponding to HTTP/0.9. |
static int |
HTTPVER_10
getHttpVer() code corresponding to HTTP/1.0. |
static int |
HTTPVER_11
getHttpVer() code corresponding to HTTP/1.1. |
private java.util.Hashtable |
query
|
static java.lang.String |
QUERY_KEY_SET
Default value for a query key. |
private java.util.Vector |
rawHeader
|
private int |
request
|
static int |
REQUEST_GET
getRequest() code corresponding to a GET request. |
static int |
REQUEST_POST
getRequest() code corresponding to a POST request. |
private java.lang.String |
url
|
private int |
user_class
|
Fields inherited from class seda.sandStorm.core.TimeStampedEvent |
---|
timestamp |
Fields inherited from interface seda.sandStorm.lib.http.httpConst |
---|
CRLF, DEFAULT_HTTP_PORT, HTTP_VERSION, WRITE_CLOG_THRESHOLD |
Constructor Summary | |
---|---|
httpRequest(httpConnection conn,
java.lang.String requestStr,
java.lang.String url,
int httpver,
java.util.Vector header)
Package-internal: Create an httpRequest from the given connection, request string, URL, HTTP version, and header. |
Method Summary | |
---|---|
private java.lang.String |
decodeURL(java.lang.String encoded)
|
httpConnection |
getConnection()
Return the corresponding HTTP connection. |
java.lang.String |
getHeader(java.lang.String key)
Return the header line corresponding to the given key. |
int |
getHttpVer()
Return the code corresponding to the HTTP version. |
java.lang.String |
getQuery(java.lang.String key)
Return the value associated with the given query key. |
java.util.Enumeration |
getQueryKeys()
Return an enumeration of keys in the query string, if any. |
java.lang.String[] |
getQuerySet(java.lang.String key)
Return the set of values associated with the given query key. |
int |
getRequest()
Return the code corresponding to the request. |
int |
getRequestClass()
|
java.lang.String |
getURL()
Return the request URL. |
boolean |
headerNeeded()
Indicates whether this request requires a header to be sent in the response (that is, whether this is HTTP/1.0 or later). |
private void |
parseHeader()
|
private void |
putVal(java.lang.String key,
java.lang.String val)
|
void |
setRequestClass(int theclass)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
public static final int REQUEST_GET
public static final int REQUEST_POST
public static final int HTTPVER_09
public static final int HTTPVER_10
public static final int HTTPVER_11
public static final java.lang.String QUERY_KEY_SET
private httpConnection conn
private int request
private java.lang.String url
private int httpver
private int user_class
private java.util.Vector rawHeader
private java.util.Hashtable header
private java.util.Hashtable query
Constructor Detail |
---|
httpRequest(httpConnection conn, java.lang.String requestStr, java.lang.String url, int httpver, java.util.Vector header) throws java.io.IOException
java.io.IOException
Method Detail |
---|
private java.lang.String decodeURL(java.lang.String encoded)
private void putVal(java.lang.String key, java.lang.String val)
public int getRequest()
public java.lang.String getURL()
public int getHttpVer()
public httpConnection getConnection()
public java.lang.String getHeader(java.lang.String key)
public java.util.Enumeration getQueryKeys()
public java.lang.String getQuery(java.lang.String key)
public java.lang.String[] getQuerySet(java.lang.String key)
public boolean headerNeeded()
private void parseHeader()
public java.lang.String toString()
toString
in class java.lang.Object
public int getRequestClass()
getRequestClass
in interface ClassQueueElementIF
public void setRequestClass(int theclass)
setRequestClass
in interface ClassQueueElementIF
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |