|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.wbi.RequestInfo
|
+--com.ibm.wbi.protocol.http.MarkupLanguageInfo
|
+--com.ibm.wbi.protocol.http.DocumentInfo
A DocumentInfo object represents a request that is in the Http 1.0 format. The DocumentInfo encapsulates a request header (the request from the browser) and a response header (the response from the generator). This class is designed to allow access to the MIME data associated with an Http 1.0 request/response stream.
| Field Summary | |
static java.lang.String |
COPYRIGHT
|
static int |
REQUESTTYPE_PROXY
The request type is proxy. |
static int |
REQUESTTYPE_SERVER
The request type is server. |
static int |
REQUESTTYPE_UNKNOWN
The request type is unknown. |
| Fields inherited from class com.ibm.wbi.protocol.http.MarkupLanguageInfo |
REQUEST_HEADER, RESPONSE_HEADER |
| Constructor Summary | |
DocumentInfo()
Constructs a new DocumentInfo object. |
|
| Method Summary | |
RequestInfo |
createInstance()
Create an empty instance of this DocumentInfo class. |
static java.lang.String |
formatClientString(java.net.InetAddress addr)
Format the client string from the InetAddress. |
java.util.Enumeration |
getAllByKey(java.lang.String key,
int whichHeader)
Returns an Enumeration containing all values associated with the specified key. |
java.util.Enumeration |
getAllKeys(int whichHeader)
Returns an Enumeration of all keys in the given header |
boolean |
getBrowserNoCache()
Returns the browserNoCache field from this DocumentInfo object. |
java.lang.String |
getByKey(java.lang.String key,
int whichHeader)
Returns a String representing the first occurrence of a value associated with the specified key. |
protected java.lang.String |
getCharEncoding(HttpHeaderAscii h)
|
java.lang.String |
getClient()
Returns the client field from this object. |
java.net.InetAddress |
getClientAddress()
Returns the client InetAddress from this object. |
java.lang.String |
getClientName()
Returns the client name from this object. |
java.lang.String |
getClientNumber()
Returns the client number from this object. |
FirewallInfo |
getFirewallInfo()
Gets the FirewallInfo that was set for this transaction. |
java.lang.String |
getHost()
Returns the host (or server) used when the request was made. |
HttpRequestHeader |
getHttpRequestHeader()
|
HttpResponseHeader |
getHttpResponseHeader()
|
int |
getLocalPort()
Determine the actual local port this request came from, instead of using the port value specified in the Http request (which may not exist). |
java.lang.String |
getMethod()
Returns the current method associated with the latest request. |
java.lang.String |
getPath()
Returns the path used when the request was made. |
int |
getPort()
Returns the port used when the request was made. |
java.lang.String |
getProtocol()
Returns the protocol used when the request was made. |
java.lang.String |
getQuery()
Returns any query data found on the requested URL. |
java.lang.String |
getRequestCharEncoding()
|
java.lang.String |
getRequestContentLength()
Get the request content length. |
java.lang.String |
getRequestContentType()
Get the request content type. |
java.lang.String |
getRequestContentTypeParameters()
Get the request content type parameters. |
java.lang.String |
getRequestHeader()
Returns the current request header (including MIME data) from the DocumentInfo object. |
int |
getRequestType()
Returns the request type associated with this DocumentInfo object. |
java.lang.String |
getResponseCharEncoding()
|
int |
getResponseCode()
Returns the response code from the response header. |
java.lang.String |
getResponseContentLength()
Returns the content length data from the response header. |
java.lang.String |
getResponseContentType()
Returns the content type data associated with the response header. |
java.lang.String |
getResponseContentTypeParameters()
Get the response content type parameters. |
java.lang.String |
getResponseHeader()
Returns the current response header (including MIME data) from the DocumentInfo object. |
java.lang.String |
getServer()
Returns the host (or server) used when the request was made. |
java.lang.String |
getUrl()
Returns the URL used when the request was made. |
java.lang.String |
getUserAgent()
Returns the user agent data from the response header. |
void |
populateInstance(RequestInfo toCopy)
Populate the object from the passed in RequestInfo (make this object a copy of the passed in one). |
void |
removeByKey(java.lang.String key,
int whichHeader)
Removes the specified key (and all values) from the header. |
void |
setBrowserNoCache()
Sets the browserNoCache field in this DocumentInfo object to true. |
void |
setCached()
Sets the cached flag to true. |
void |
setClient(java.net.InetAddress addr)
Sets the client address field within this DocumentInfo object to the passed InetAddress object. |
void |
setClient(java.lang.String s)
Sets the client field within this DocumentInfo object to the passed string. |
void |
setFirewallInfo(FirewallInfo fi)
Sets this transaction's firewall information -- set if you want to use a socks or proxy server that is different that that specified in the config file. |
void |
setLocalPort(int localport)
Set the actual local port this request came from; instead of using the port value specified in the Http request (which may not exist). |
void |
setRequestHeader(byte[] b,
int offset,
int length)
|
void |
setRequestHeader(HttpRequestHeader h)
|
void |
setRequestHeader(java.lang.String s)
Sets the request header field in this DocumentInfo object to the passed StringBuffer. |
void |
setRequestHeader(java.lang.StringBuffer s)
Sets the request header field in this DocumentInfo object to the passed StringBuffer. |
void |
setResponseHeader(byte[] b,
int offset,
int length)
|
void |
setResponseHeader(HttpHeader header)
Deprecated. Use HttpResponseHeader instead of HttpHeader |
void |
setResponseHeader(HttpResponseHeader h)
|
void |
setResponseHeader(java.lang.String s)
Sets the response header field in this DocumentInfo object to the passed String. |
void |
setResponseHeader(java.lang.StringBuffer s)
Sets the response header field in this DocumentInfo object to the passed StringBuffer. |
java.lang.String |
toString()
Produce a brief human-readable description of the request |
protected void |
updateRules(HttpRequestHeader h)
|
protected void |
updateRules(HttpResponseHeader h)
|
boolean |
wasCached()
Queries the cached flag. |
| Methods inherited from class com.ibm.wbi.RequestInfo |
addRule, getAllExtraRuleKeys, getExtraRuleKey, getRule, getRuleAttributes, getRuleBundle, getRuleValues, getTransactionData, getTransactionDataElements, getTransactionDataKeys, removeRule, setExtraRuleKey, setTransactionData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String COPYRIGHT
public static final int REQUESTTYPE_UNKNOWN
public static final int REQUESTTYPE_PROXY
public static final int REQUESTTYPE_SERVER
| Constructor Detail |
public DocumentInfo()
| Method Detail |
public java.lang.String toString()
toString in class MarkupLanguageInfopublic RequestInfo createInstance()
createInstance in class RequestInfopublic void populateInstance(RequestInfo toCopy)
populateInstance in class RequestInfotoCopy - The RequestInfo to populate from.public void setRequestHeader(java.lang.StringBuffer s)
s - The inbound StringBuffer representing the raw request
header.public void setRequestHeader(java.lang.String s)
s - The inbound String representing the raw request header.public java.lang.String getRequestHeader()
public HttpRequestHeader getHttpRequestHeader()
public void setRequestHeader(byte[] b,
int offset,
int length)
public void setRequestHeader(HttpRequestHeader h)
public void setResponseHeader(HttpResponseHeader h)
public void setResponseHeader(byte[] b,
int offset,
int length)
public void setResponseHeader(java.lang.String s)
s - The inbound String representing the raw response header.public void setResponseHeader(HttpHeader header)
header - The inbound HttpHeader object representing the raw
response header.public HttpResponseHeader getHttpResponseHeader()
public void setResponseHeader(java.lang.StringBuffer s)
s - The inbound public java.lang.String getResponseHeader()
public void setClient(java.lang.String s)
s - The inbound string that will become the client.public void setClient(java.net.InetAddress addr)
InetAddress object.addr - The inbound InetAddress that will become
the client address.public java.lang.String getClient()
public java.lang.String getClientNumber()
public java.lang.String getClientName()
public java.net.InetAddress getClientAddress()
InetAddress from this object.null if the field has not been set; else the
client InetAddress.public void setLocalPort(int localport)
localport - The actual port the request came in from.public int getLocalPort()
public java.lang.String getMethod()
public java.lang.String getProtocol()
public java.lang.String getHost()
public java.lang.String getServer()
public int getPort()
public java.lang.String getPath()
public java.lang.String getQuery()
null if the
request header field has not been set; else a string
representing the query data.public java.lang.String getUrl()
public int getResponseCode()
int representing the response code.public void setBrowserNoCache()
public boolean getBrowserNoCache()
true if browserNoCache field is true;
else false.public java.lang.String getRequestContentType()
getRequestContentType in class MarkupLanguageInfopublic java.lang.String getRequestContentTypeParameters()
public java.lang.String getResponseContentType()
getResponseContentType in class MarkupLanguageInfopublic java.lang.String getResponseContentTypeParameters()
public java.lang.String getRequestContentLength()
getRequestContentLength in class MarkupLanguageInfopublic java.lang.String getResponseContentLength()
getResponseContentLength in class MarkupLanguageInfopublic java.lang.String getUserAgent()
public int getRequestType()
public void setCached()
public boolean wasCached()
true if cache page was cached; else
false.public java.util.Enumeration getAllKeys(int whichHeader)
public java.lang.String getByKey(java.lang.String key,
int whichHeader)
getByKey in class MarkupLanguageInfokey - A MIME data key used when consulting the header
string.whichHeader - Selects which header to search; One of
REQUEST_HEADER, RESPONSE_HEADER
public java.util.Enumeration getAllByKey(java.lang.String key,
int whichHeader)
key - A MIME data key used when consulting the header
string.whichHeader - Selects which header to search; One of
REQUEST_HEADER, RESPONSE_HEADER
public void removeByKey(java.lang.String key,
int whichHeader)
key - A MIME data key used when consulting the header
string.whichHeader - Selects which header to search; One of
REQUEST_HEADER, RESPONSE_HEADERpublic void setFirewallInfo(FirewallInfo fi)
fi - FirewallInfo object to setpublic FirewallInfo getFirewallInfo()
public java.lang.String getRequestCharEncoding()
throws com.ibm.wbi.NotCharDataException
getRequestCharEncoding in class RequestInfo
public java.lang.String getResponseCharEncoding()
throws com.ibm.wbi.NotCharDataException
getResponseCharEncoding in class RequestInfo
protected java.lang.String getCharEncoding(HttpHeaderAscii h)
throws com.ibm.wbi.NotCharDataException
protected void updateRules(HttpRequestHeader h)
protected void updateRules(HttpResponseHeader h)
public static java.lang.String formatClientString(java.net.InetAddress addr)
InetAddress.addr - The address.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||