Source Code Cross Referenced for Procattr.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » tomcat » jni » 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 » apache tomcat 6.0.14 » org.apache.tomcat.jni 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:
018:        package org.apache.tomcat.jni;
019:
020:        /** Procattr
021:         *
022:         * @author Mladen Turk
023:         * @version $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
024:         */
025:
026:        public class Procattr {
027:
028:            /**
029:             * Create and initialize a new procattr variable
030:             * @param cont The pool to use
031:             * @return The newly created procattr.
032:             */
033:            public static native long create(long cont) throws Error;
034:
035:            /**
036:             * Determine if any of stdin, stdout, or stderr should be linked to pipes
037:             * when starting a child process.
038:             * @param attr The procattr we care about.
039:             * @param in Should stdin be a pipe back to the parent?
040:             * @param out Should stdout be a pipe back to the parent?
041:             * @param err Should stderr be a pipe back to the parent?
042:             */
043:            public static native int ioSet(long attr, int in, int out, int err);
044:
045:            /**
046:             * Set the child_in and/or parent_in values to existing apr_file_t values.
047:             * <br />
048:             * This is NOT a required initializer function. This is
049:             * useful if you have already opened a pipe (or multiple files)
050:             * that you wish to use, perhaps persistently across multiple
051:             * process invocations - such as a log file. You can save some
052:             * extra function calls by not creating your own pipe since this
053:             * creates one in the process space for you.
054:             * @param attr The procattr we care about.
055:             * @param in apr_file_t value to use as child_in. Must be a valid file.
056:             * @param parent apr_file_t value to use as parent_in. Must be a valid file.
057:             */
058:            public static native int childInSet(long attr, long in, long parent);
059:
060:            /**
061:             * Set the child_out and parent_out values to existing apr_file_t values.
062:             * <br />
063:             * This is NOT a required initializer function. This is
064:             * useful if you have already opened a pipe (or multiple files)
065:             * that you wish to use, perhaps persistently across multiple
066:             * process invocations - such as a log file.
067:             * @param attr The procattr we care about.
068:             * @param out apr_file_t value to use as child_out. Must be a valid file.
069:             * @param parent apr_file_t value to use as parent_out. Must be a valid file.
070:             */
071:            public static native int childOutSet(long attr, long out,
072:                    long parent);
073:
074:            /**
075:             * Set the child_err and parent_err values to existing apr_file_t values.
076:             * <br />
077:             * This is NOT a required initializer function. This is
078:             * useful if you have already opened a pipe (or multiple files)
079:             * that you wish to use, perhaps persistently across multiple
080:             * process invocations - such as a log file.
081:             * @param attr The procattr we care about.
082:             * @param err apr_file_t value to use as child_err. Must be a valid file.
083:             * @param parent apr_file_t value to use as parent_err. Must be a valid file.
084:             */
085:            public static native int childErrSet(long attr, long err,
086:                    long parent);
087:
088:            /**
089:             * Set which directory the child process should start executing in.
090:             * @param attr The procattr we care about.
091:             * @param dir Which dir to start in.  By default, this is the same dir as
092:             *            the parent currently resides in, when the createprocess call
093:             *            is made.
094:             */
095:            public static native int dirSet(long attr, String dir);
096:
097:            /**
098:             * Set what type of command the child process will call.
099:             * @param attr The procattr we care about.
100:             * @param cmd The type of command.  One of:
101:             * <PRE>
102:             * APR_SHELLCMD     --  Anything that the shell can handle
103:             * APR_PROGRAM      --  Executable program   (default)
104:             * APR_PROGRAM_ENV  --  Executable program, copy environment
105:             * APR_PROGRAM_PATH --  Executable program on PATH, copy env
106:             * </PRE>
107:             */
108:            public static native int cmdtypeSet(long attr, int cmd);
109:
110:            /**
111:             * Determine if the child should start in detached state.
112:             * @param attr The procattr we care about.
113:             * @param detach Should the child start in detached state?  Default is no.
114:             */
115:            public static native int detachSet(long attr, int detach);
116:
117:            /**
118:             * Specify that apr_proc_create() should do whatever it can to report
119:             * failures to the caller of apr_proc_create(), rather than find out in
120:             * the child.
121:             * @param attr The procattr describing the child process to be created.
122:             * @param chk Flag to indicate whether or not extra work should be done
123:             *            to try to report failures to the caller.
124:             * <br />
125:             * This flag only affects apr_proc_create() on platforms where
126:             * fork() is used.  This leads to extra overhead in the calling
127:             * process, but that may help the application handle such
128:             * errors more gracefully.
129:             */
130:            public static native int errorCheckSet(long attr, int chk);
131:
132:            /**
133:             * Determine if the child should start in its own address space or using the
134:             * current one from its parent
135:             * @param attr The procattr we care about.
136:             * @param addrspace Should the child start in its own address space?  Default
137:             * is no on NetWare and yes on other platforms.
138:             */
139:            public static native int addrspaceSet(long attr, int addrspace);
140:
141:            /**
142:             * Specify an error function to be called in the child process if APR
143:             * encounters an error in the child prior to running the specified program.
144:             * @param attr The procattr describing the child process to be created.
145:             * @param pool The the pool to use.
146:             * @param o The Object to call in the child process.
147:             * <br />
148:             * At the present time, it will only be called from apr_proc_create()
149:             * on platforms where fork() is used.  It will never be called on other
150:             * platforms, on those platforms apr_proc_create() will return the error
151:             * in the parent process rather than invoke the callback in the now-forked
152:             * child process.
153:             */
154:            public static native void errfnSet(long attr, long pool, Object o);
155:
156:            /**
157:             * Set the username used for running process
158:             * @param attr The procattr we care about.
159:             * @param username The username used
160:             * @param password User password if needed. Password is needed on WIN32
161:             *                 or any other platform having
162:             *                 APR_PROCATTR_USER_SET_REQUIRES_PASSWORD set.
163:             */
164:            public static native int userSet(long attr, String username,
165:                    String password);
166:
167:            /**
168:             * Set the group used for running process
169:             * @param attr The procattr we care about.
170:             * @param groupname The group name  used
171:             */
172:            public static native int groupSet(long attr, String groupname);
173:
174:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.