|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--org.apache.catalina.util.ProcessHelper
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.
コンストラクタの概要 | |
ProcessHelper(java.lang.String command,
java.util.Hashtable env,
java.io.File wd,
java.util.Hashtable params)
Creates a ProcessHelper and initializes its environment, working directory, and query parameters. |
メソッドの概要 | |
int |
getIClientInputTimeout()
|
protected java.lang.String |
getPostInput(java.util.Hashtable params)
Gets a string for input to a POST cgi script |
boolean |
isReady()
Gets ready status |
void |
run()
Executes a process script with the desired environment, current working directory, and input/output streams This implements the following CGI specification recommedations: Servers SHOULD provide the " query " component of
the script-URI as command-line arguments to scripts if it
does not contain any unencoded "=" characters and the
command-line arguments can be generated in an unambiguous
manner.
|
void |
setIClientInputTimeout(int iClientInputTimeout)
|
void |
setInput(java.io.InputStream stdin)
Sets standard input to be passed on to the invoked cgi script |
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets HttpServletResponse object used to set headers and send output to |
protected void |
updateReadyStatus()
Checks & sets ready status |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public ProcessHelper(java.lang.String command, java.util.Hashtable env, java.io.File wd, java.util.Hashtable params)
setInput
and setResponse
methods,
respectively.command
- string full path to command to be executedenv
- Hashtable with the desired script environmentwd
- File with the script's desired working directoryparams
- Hashtable with the script's query parametersres
- HttpServletResponse object for setting headers
based on CGI script outputメソッドの詳細 |
protected void updateReadyStatus()
public boolean isReady()
run
will throw
an exception), true if readypublic void setResponse(javax.servlet.http.HttpServletResponse response)
response
- HttpServletResponse to be usedpublic void setInput(java.io.InputStream stdin)
stdin
- InputStream to be usedpublic void run() throws java.io.IOException
This implements the following CGI specification recommedations:
query
" component of
the script-URI as command-line arguments to scripts if it
does not contain any unencoded "=" characters and the
command-line arguments can be generated in an unambiguous
manner.
auth-scheme
" token of the
"Authorization
" if it was supplied as part of the
request header. See getCGIEnvironment
method.
.
" and "..
" path
segments:
This implementation does not allow ".
" and
"..
" in the the path, and such characters
will result in an IOException being thrown;
java.io.IOException
- if problems during reading/writing occurjava.lang.Runtime#exec(String command, String[] envp,
File dir)
protected java.lang.String getPostInput(java.util.Hashtable params)
params
- Hashtable of query parameters to be passed to
the CGI scriptpublic int getIClientInputTimeout()
public void setIClientInputTimeout(int iClientInputTimeout)
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |