|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kom.tools.web.HTTPResponse
Definition of an HTTP requestHandler
Field Summary | |
static java.lang.String |
APPLICATION_URLENCODED
|
(package private) java.lang.String |
boundary
|
static java.lang.String |
BOUNDARY
|
protected boolean |
broke
|
boolean |
close
|
protected HTTPConfig |
config
|
(package private) java.lang.String |
contentType
|
protected java.lang.String |
cursor
|
java.io.File |
fileToDelete
|
(package private) Gateway |
gateway
|
java.lang.String |
header
|
(package private) javax.servlet.ServletInputStream |
in
|
(package private) int |
len
|
java.lang.String |
method
|
(package private) boolean |
newSession
|
(package private) javax.servlet.ServletOutputStream |
out
|
protected java.util.Hashtable |
pairs
|
java.lang.String |
protocol
|
protected java.lang.String |
reasonPhrase
|
javax.servlet.http.HttpServletRequest |
request
|
javax.servlet.http.HttpServletResponse |
response
|
(package private) int |
sendBytes
|
protected java.lang.String |
servletBase
|
javax.servlet.http.HttpSession |
session
|
java.lang.String |
sessionId
|
protected int |
statusCode
|
protected java.lang.String |
tmpFile
|
java.util.Hashtable |
upload
|
java.lang.String |
uri
|
Constructor Summary | |
HTTPResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Gateway gateway,
HTTPConfig config)
Class constructor |
Method Summary | |
void |
addHeader(java.lang.String name,
java.lang.String value)
Adds a response header |
java.lang.String |
get(java.lang.String name)
Gets the value of a parameter contained in the query string. |
javax.servlet.http.HttpSession |
getHttpSession()
Gets current HttpSession |
abstract java.io.InputStream |
getResponseData()
Assembles response data, returning it as an InputStream |
java.lang.String[] |
getValues(java.lang.String name)
Gets values for name (from pairs) as a String[] |
java.util.Enumeration |
names()
Returns all parameter names in the query string or form |
void |
parseURI(java.lang.String r)
Parses a URI query string for name/value pairs. |
void |
processRequest()
Processes the request, sending the response to the client |
void |
put(java.lang.String param,
int value)
Puts param=int value in pairs table |
void |
put(java.lang.String param,
java.lang.String value)
Puts param=value in pairs table if both are non-null |
boolean |
readRequest()
Reads and classifies data from request. |
void |
setCookie(java.lang.String name,
java.lang.String value)
|
void |
setPhrase(java.lang.String phrase)
Sets reason phrase for response |
void |
setStatus(int status)
Sets response status code |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final java.lang.String APPLICATION_URLENCODED
public static final java.lang.String BOUNDARY
public java.lang.String method
public java.lang.String uri
public java.lang.String protocol
public java.lang.String header
public java.util.Hashtable upload
protected java.util.Hashtable pairs
protected java.lang.String tmpFile
java.lang.String contentType
java.lang.String boundary
int len
public javax.servlet.http.HttpServletRequest request
public javax.servlet.http.HttpSession session
public java.lang.String sessionId
javax.servlet.ServletInputStream in
javax.servlet.ServletOutputStream out
public javax.servlet.http.HttpServletResponse response
protected HTTPConfig config
protected boolean broke
public boolean close
protected int statusCode
protected java.lang.String reasonPhrase
protected java.lang.String cursor
protected java.lang.String servletBase
int sendBytes
boolean newSession
Gateway gateway
public java.io.File fileToDelete
Constructor Detail |
public HTTPResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Gateway gateway, HTTPConfig config) throws javax.servlet.ServletException, java.io.IOException, java.lang.IllegalArgumentException
request
- HTTP requestresponse
- HTTP responsegateway
- Client supervisorconfig
- Configuration dataMethod Detail |
public boolean readRequest()
public void setCookie(java.lang.String name, java.lang.String value)
public javax.servlet.http.HttpSession getHttpSession()
public void setStatus(int status)
status
- Status code to be setpublic void setPhrase(java.lang.String phrase)
phrase
- Explains the reason for the return codepublic void addHeader(java.lang.String name, java.lang.String value)
name
- Header namevalue
- Header valuepublic void put(java.lang.String param, java.lang.String value)
name
- Key to valuevalue
- Value stringpublic void put(java.lang.String param, int value)
name
- Key to valuevalue
- int valuepublic java.lang.String get(java.lang.String name)
name
- the name of the query parameter to retrievepublic java.lang.String[] getValues(java.lang.String name)
name
- Keypublic java.util.Enumeration names()
public abstract java.io.InputStream getResponseData()
public void processRequest()
public void parseURI(java.lang.String r)
r
- The input String
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |