|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.servlet.CGIServlet.CGIRunner
protected abstract class CGIServlet.CGIRunner
Encapsulates the knowledge of how to run a CGI script, given the script's desired environment and (optionally) input/output streams
Exposes a run method used to actually invoke the
CGI.
The CGI environment and settings are derived from the information passed to the constuctor.
The input and output streams can be set by the setInput
and setResponse methods, respectively.
| Field Summary | |
|---|---|
protected java.util.HashMap |
env
environment used when invoking the cgi script |
protected javax.servlet.http.HttpServletResponse |
response
response object used to set headers & get output stream |
protected java.io.InputStream |
stdin
stdin to be passed to cgi script |
protected java.io.File |
wd
working directory used when invoking the cgi script |
| Constructor Summary | |
|---|---|
protected |
CGIServlet.CGIRunner(CGIServlet.CGIEnvironment env)
|
| Method Summary | |
|---|---|
protected void |
addHeader(java.lang.String line)
|
protected abstract void |
execute()
|
protected void |
setInput(java.io.InputStream stdin)
Sets standard input to be passed on to the invoked cgi script |
protected void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets HttpServletResponse object used to set headers and send output to |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.HashMap env
protected java.io.File wd
protected java.io.InputStream stdin
protected javax.servlet.http.HttpServletResponse response
| Constructor Detail |
|---|
protected CGIServlet.CGIRunner(CGIServlet.CGIEnvironment env)
| Method Detail |
|---|
protected abstract void execute()
throws java.io.IOException,
javax.servlet.ServletException,
java.lang.InterruptedException
java.io.IOException
javax.servlet.ServletException
java.lang.InterruptedExceptionprotected void setResponse(javax.servlet.http.HttpServletResponse response)
response - HttpServletResponse to be usedprotected void setInput(java.io.InputStream stdin)
stdin - InputStream to be usedprotected void addHeader(java.lang.String line)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||