Java Doc for ProcessHelper.java in  » Sevlet-Container » tomcat-catalina » org » apache » catalina » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » tomcat catalina » org.apache.catalina.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.util.ProcessHelper

ProcessHelper
public class ProcessHelper (Code)
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.


author:
   Martin Dengler [root@martindengler.com]
version:
   $Revision: 1.5 $, $Date: 2004/05/26 16:26:05 $



Constructor Summary
public  ProcessHelper(String command, Hashtable env, File wd, Hashtable params)
     Creates a ProcessHelper and initializes its environment, working directory, and query parameters.

Method Summary
public  intgetIClientInputTimeout()
    
protected  StringgetPostInput(Hashtable params)
    
public  booleanisReady()
    
public  voidrun()
     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.
  • Servers SHOULD set the AUTH_TYPE metavariable to the value of the "auth-scheme" token of the "Authorization" if it was supplied as part of the request header.
public  voidsetIClientInputTimeout(int iClientInputTimeout)
    
public  voidsetInput(InputStream stdin)
    
public  voidsetResponse(HttpServletResponse response)
    
protected  voidupdateReadyStatus()
    


Constructor Detail
ProcessHelper
public ProcessHelper(String command, Hashtable env, File wd, Hashtable params)(Code)
Creates a ProcessHelper and initializes its environment, working directory, and query parameters.
Input/output streams (optional) are set using the setInput and setResponse methods, respectively.
Parameters:
  command - string full path to command to be executed
Parameters:
  env - Hashtable with the desired script environment
Parameters:
  wd - File with the script's desired working directory
Parameters:
  params - Hashtable with the script's query parameters




Method Detail
getIClientInputTimeout
public int getIClientInputTimeout()(Code)



getPostInput
protected String getPostInput(Hashtable params)(Code)
Gets a string for input to a POST cgi script
Parameters:
  params - Hashtable of query parameters to be passed tothe CGI script for use as input to the CGI script



isReady
public boolean isReady()(Code)
Gets ready status false if not ready (run will throwan exception), true if ready



run
public void run() throws IOException(Code)
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.
  • Servers SHOULD set the AUTH_TYPE metavariable to the value of the "auth-scheme" token of the "Authorization" if it was supplied as part of the request header. See getCGIEnvironment method.
  • Where applicable, servers SHOULD set the current working directory to the directory in which the script is located before invoking it.
  • Server implementations SHOULD define their behavior for the following cases:
    • Allowed characters in pathInfo: This implementation does not allow ASCII NUL nor any character which cannot be URL-encoded according to internet standards;
    • Allowed characters in path segments: This implementation does not allow non-terminal NULL segments in the the path -- IOExceptions may be thrown;
    • "." and ".." path segments: This implementation does not allow "." and ".." in the the path, and such characters will result in an IOException being thrown;
    • Implementation limitations: This implementation does not impose any limitations except as documented above. This implementation may be limited by the servlet container used to house this implementation. In particular, all the primary CGI variable values are derived either directly or indirectly from the container's implementation of the Servlet API methods.

For more information, see java.lang.Runtime#exec(String command, String[] envp, File dir)
exception:
  IOException - if problems during reading/writing occur



setIClientInputTimeout
public void setIClientInputTimeout(int iClientInputTimeout)(Code)



setInput
public void setInput(InputStream stdin)(Code)
Sets standard input to be passed on to the invoked cgi script
Parameters:
  stdin - InputStream to be used



setResponse
public void setResponse(HttpServletResponse response)(Code)
Sets HttpServletResponse object used to set headers and send output to
Parameters:
  response - HttpServletResponse to be used



updateReadyStatus
protected void updateReadyStatus()(Code)
Checks & sets ready status



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.