|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
com.ptc.windchill.index.indexloader.IndexLoaderResponse
This class is a carrier of response information back to the IndexLoader program. The object contains fields to store response header information, an output stream reference, and a target class and method.
Note that the headers must be set on the response prior to getting the response outputstream.
Note: Three response headers are set by default: Protocol is set to HTTP/1.0; Status is set to 200 (OK); and Content-Type is set to text/plain. If you need to set other headers or change these defaults, you must do so in your response processing PRIOR to calling getOutputStream.
Nested Class Summary |
Nested classes inherited from class java.util.Hashtable |
|
Field Summary | |
private boolean |
headers_frozen
|
private boolean |
headers_written
|
private OutputStream |
out
|
private boolean |
parent_is_servlet
|
private Object |
servletRes
|
(package private) static boolean |
VERBOSE
|
private static String |
versionID
|
Fields inherited from class java.util.Hashtable |
|
Constructor Summary | |
IndexLoaderResponse(javax.servlet.http.HttpServletResponse res)
Public constructor used by servlet |
|
IndexLoaderResponse(OutputStream Out)
Public constructor used by CGI |
Method Summary | |
boolean |
containsHeader(String s)
Checks if the response header is present. |
OutputStream |
getOutputStream()
Called to get the output stream to write the data to. |
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 |
setStatus(int v1)
Sets a simple Status response header. |
void |
setStatus(int v1,
String s1)
Sets a Status response header. |
void |
writeHeaders(javax.servlet.http.HttpServletResponse ServletWriter)
Causes all response headers presently set to be writen as appropriate using the servlet's header methods. |
void |
writeHeaders(OutputStream outputStream)
Causes all response headers presently set to be writen as appropriate to the output stream of the CGI. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String versionID
private boolean parent_is_servlet
private boolean headers_frozen
private boolean headers_written
private Object servletRes
private OutputStream out
static boolean VERBOSE
Constructor Detail |
public IndexLoaderResponse(javax.servlet.http.HttpServletResponse res)
public IndexLoaderResponse(OutputStream Out)
Method Detail |
public OutputStream getOutputStream()
public boolean containsHeader(String s)
s
- String the header to search for.
public void setHeader(String s1, String s2)
s1
- String name of the headers2
- String value to which header is setpublic void setDateHeader(String s1, long date)
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)
s1
- String name of the headerv1
- int value to which header is setpublic void setStatus(int v1)
v1
- Integer Status codepublic void setStatus(int v1, String s1)
v1
- Integer Status codes1
- String Status reason codepublic void writeHeaders(javax.servlet.http.HttpServletResponse ServletWriter)
public void writeHeaders(OutputStream outputStream)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |