|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.httpgw.HTTPResponse
wt.httpgw.HTTPServletResponse
Field Summary | |
private HTTPResponseHeaders |
hdrs
|
private OutputStream |
out
|
private String |
remoteHost
|
private Object[] |
respTargetArgs
|
private Method |
respTargetMethod
|
private javax.servlet.http.HttpServletResponse |
servletResponse
|
private static boolean |
VERBOSE_SERVER
|
Fields inherited from class wt.httpgw.HTTPResponse |
respException, serialVersionUID |
Constructor Summary | |
HTTPServletResponse(javax.servlet.http.HttpServletResponse response)
|
Method Summary | |
boolean |
containsHeader(String s)
Checks if the response header is present. |
Object |
get(String s)
Gets the value of this response header key. |
OutputStream |
getOutputStream()
Called to get the output stream to write the data to. |
void |
invoke()
Invoke the target method to write the response. |
Enumeration |
keys()
Gets the response header keys. |
void |
setDateHeader(String s1,
long date)
Sets a date type response header. |
void |
setHeader(String s1,
String s2)
Sets a string type response header. |
void |
setIntHeader(String s1,
int v1)
Sets a int type response header. |
void |
setRemoteHost(String remote_host)
Setter for the remote host that will be displayed in exception tracebacks. |
void |
setRespTarget(Method method,
Object[] args)
Setter for the target method that will generate the real response to the output stream. |
void |
setStatus(int v1)
Sets a simple Status response header. |
void |
setStatus(int v1,
String s1)
Sets a Status response header. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static boolean VERBOSE_SERVER
private javax.servlet.http.HttpServletResponse servletResponse
private OutputStream out
private Method respTargetMethod
private Object[] respTargetArgs
private String remoteHost
private HTTPResponseHeaders hdrs
Constructor Detail |
public HTTPServletResponse(javax.servlet.http.HttpServletResponse response) throws WTIOException
Method Detail |
public OutputStream getOutputStream() throws IOException
getOutputStream
in class HTTPResponse
IOException
- if not marshaling response in writeObject.
the output stream is null until such time.
Also, if the response target class or method is
null. There is not a proper business class or
method to write the response.public void setRespTarget(Method method, Object[] args)
setRespTarget
in class HTTPResponse
method
- is the target business Methodargs
- are the object array of arguments
needed my the target method.public void setRemoteHost(String remote_host)
setRemoteHost
in class HTTPResponse
public boolean containsHeader(String s)
containsHeader
in class HTTPResponse
s
- String the header to search for.
public Enumeration keys()
keys
in class HTTPResponse
public Object get(String s)
get
in class HTTPResponse
s
- the key, as a string, to get the value of.
public void setHeader(String s1, String s2)
setHeader
in class HTTPResponse
s1
- String name of the headers2
- String value to which header is setpublic void setDateHeader(String s1, long date)
setDateHeader
in class HTTPResponse
s1
- String name of the headerdate
- long value to which header is set
value is milliseconds since the epoch.public void setIntHeader(String s1, int v1)
setIntHeader
in class HTTPResponse
s1
- String name of the headerv1
- int value to which header is setpublic void setStatus(int v1)
setStatus
in class HTTPResponse
v1
- Integer Status codepublic void setStatus(int v1, String s1)
setStatus
in class HTTPResponse
v1
- Integer Status codes1
- String Status reason codepublic void invoke()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |