|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.com.lastweekend.cgi.CGIProcess
public class CGIProcess
Note. Processes are inherently dangerous and prone to blocking and unrecoverable deadlocks. This class does NOTHING to work around this problem.
The particular scenario is your request sends a lot of content, more than can be buffered by the OS. The CGI script ignores this content and sends a lot of output...
This class will block waiting for the content on stdin to be read by the CGI script, and the CGI script is blocked waiting for something to read stdout = Deadlock.
| Field Summary | |
|---|---|
protected static int |
BUFFER_SIZE
|
| Constructor Summary | |
|---|---|
CGIProcess()
|
|
CGIProcess(java.lang.String cmdPrefix)
|
|
| Method Summary | |
|---|---|
void |
exec(java.io.File scriptFile,
java.util.Map<java.lang.String,java.lang.String> env)
Execute the CGI script |
int |
getExitCode()
|
java.io.InputStream |
getStandardOutput()
|
void |
pipeInput(java.io.InputStream in,
int contentLength)
Send request input to the CGI process |
void |
terminate()
Causes any CGI related system resources to be returned. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int BUFFER_SIZE
| Constructor Detail |
|---|
public CGIProcess()
public CGIProcess(java.lang.String cmdPrefix)
| Method Detail |
|---|
public void exec(java.io.File scriptFile,
java.util.Map<java.lang.String,java.lang.String> env)
throws CGIException
CGI
exec in interface CGIscriptFile - The script.env - CGI arguments
CGIExceptionpublic java.io.InputStream getStandardOutput()
getStandardOutput in interface CGIpublic int getExitCode()
getExitCode in interface CGI
public void pipeInput(java.io.InputStream in,
int contentLength)
throws java.io.IOException
CGI
pipeInput in interface CGIcontentLength - in bytes
java.io.IOExceptionpublic void terminate()
CGI
terminate in interface CGI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||