Java Doc for Proc.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 Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tomcat.jni.Proc

Proc
public class Proc (Code)
Proc
author:
   Mladen Turk
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $


Field Summary
final public static  intAPR_CHILD_BLOCK
    
final public static  intAPR_FULL_BLOCK
    
final public static  intAPR_FULL_NONBLOCK
    
final public static  intAPR_JUST_WAIT
    
final public static  intAPR_KILL_AFTER_TIMEOUT
    
final public static  intAPR_KILL_ALWAYS
    
final public static  intAPR_KILL_NEVER
    
final public static  intAPR_KILL_ONLY_ONCE
    
final public static  intAPR_LIMIT_CPU
    
final public static  intAPR_LIMIT_MEM
    
final public static  intAPR_LIMIT_NOFILE
    
final public static  intAPR_LIMIT_NPROC
    
final public static  intAPR_NOWAIT
    
final public static  intAPR_NO_PIPE
    
final public static  intAPR_OC_REASON_DEATH
    
final public static  intAPR_OC_REASON_LOST
     somehow the child exited without us knowing ...
final public static  intAPR_OC_REASON_RESTART
    
final public static  intAPR_OC_REASON_RUNNING
     a health check is occuring, for most maintainence functions this is a no-op.
final public static  intAPR_OC_REASON_UNREGISTER
    
final public static  intAPR_OC_REASON_UNWRITABLE
    
final public static  intAPR_PARENT_BLOCK
    
final public static  intAPR_PROC_DETACH_DAEMONIZE
    
final public static  intAPR_PROC_DETACH_FOREGROUND
    
final public static  intAPR_PROC_EXIT
    
final public static  intAPR_PROC_SIGNAL
    
final public static  intAPR_PROC_SIGNAL_CORE
    
final public static  intAPR_PROGRAM
    
final public static  intAPR_PROGRAM_ENV
    
final public static  intAPR_PROGRAM_PATH
    
final public static  intAPR_SHELLCM
    
final public static  intAPR_SHELLCMD_ENV
    
final public static  intAPR_WAIT
    
final public static  intMAX_ARGS_SIZE
    
final public static  intMAX_ENV_SIZE
    


Method Summary
native public static  longalloc(long cont)
     Allocate apr_proc_t stucture from pool This is not an apr function.
native public static  intcreate(long proc, String progname, String[] args, String[] env, long attr, long pool)
     Create a new process and execute a new program within that process. This function returns without waiting for the new process to terminate; use apr_proc_wait for that.
Parameters:
  progname - The program to run
Parameters:
  args - The arguments to pass to the new program.
native public static  intdetach(int daemonize)
     Detach the process from the controlling terminal.
native public static  intfork(long[] proc, long cont)
     This is currently the only non-portable call in APR.
native public static  intkill(long proc, int sig)
     Terminate a process.
native public static  intwait(long proc, int[] exit, int waithow)
     Wait for a child process to die
Parameters:
  proc - The process handle that corresponds to the desired child process
Parameters:
  exit - exit[0] The returned exit status of the child, if a child processdies, or the signal that caused the child to die.On platforms that don't support obtaining this information,the status parameter will be returned as APR_ENOTIMPL.exit[1] Why the child died, the bitwise or of:
APR_PROC_EXIT         -- process terminated normallyAPR_PROC_SIGNAL       -- process was killed by a signalAPR_PROC_SIGNAL_CORE  -- process was killed by a signal, andgenerated a core dump.

Parameters:
  waithow - How should we wait.
native public static  intwaitAllProcs(long proc, int[] exit, int waithow, long pool)
     Wait for any current child process to die and return information about that child.
Parameters:
  proc - Pointer to NULL on entry, will be filled out with child'sinformation
Parameters:
  exit - exit[0] The returned exit status of the child, if a child processdies, or the signal that caused the child to die.On platforms that don't support obtaining this information,the status parameter will be returned as APR_ENOTIMPL.exit[1] Why the child died, the bitwise or of:
APR_PROC_EXIT         -- process terminated normallyAPR_PROC_SIGNAL       -- process was killed by a signalAPR_PROC_SIGNAL_CORE  -- process was killed by a signal, andgenerated a core dump.

Parameters:
  waithow - How should we wait.

Field Detail
APR_CHILD_BLOCK
final public static int APR_CHILD_BLOCK(Code)



APR_FULL_BLOCK
final public static int APR_FULL_BLOCK(Code)



APR_FULL_NONBLOCK
final public static int APR_FULL_NONBLOCK(Code)



APR_JUST_WAIT
final public static int APR_JUST_WAIT(Code)
wait forever for the process to complete



APR_KILL_AFTER_TIMEOUT
final public static int APR_KILL_AFTER_TIMEOUT(Code)
SIGTERM, wait 3 seconds, SIGKILL



APR_KILL_ALWAYS
final public static int APR_KILL_ALWAYS(Code)
process is sent SIGKILL on apr_pool_t cleanup



APR_KILL_NEVER
final public static int APR_KILL_NEVER(Code)
process is never sent any signals



APR_KILL_ONLY_ONCE
final public static int APR_KILL_ONLY_ONCE(Code)
send SIGTERM and then wait



APR_LIMIT_CPU
final public static int APR_LIMIT_CPU(Code)



APR_LIMIT_MEM
final public static int APR_LIMIT_MEM(Code)



APR_LIMIT_NOFILE
final public static int APR_LIMIT_NOFILE(Code)



APR_LIMIT_NPROC
final public static int APR_LIMIT_NPROC(Code)



APR_NOWAIT
final public static int APR_NOWAIT(Code)
wait for the specified process to finish



APR_NO_PIPE
final public static int APR_NO_PIPE(Code)
process exited and dumped a core file



APR_OC_REASON_DEATH
final public static int APR_OC_REASON_DEATH(Code)
child has died, caller must call unregister still



APR_OC_REASON_LOST
final public static int APR_OC_REASON_LOST(Code)
somehow the child exited without us knowing ... buggy os?



APR_OC_REASON_RESTART
final public static int APR_OC_REASON_RESTART(Code)
a restart is occuring, perform any necessary cleanup (including sending a special signal to child)



APR_OC_REASON_RUNNING
final public static int APR_OC_REASON_RUNNING(Code)
a health check is occuring, for most maintainence functions this is a no-op.



APR_OC_REASON_UNREGISTER
final public static int APR_OC_REASON_UNREGISTER(Code)
unregister has been called, do whatever is necessary (including kill the child)



APR_OC_REASON_UNWRITABLE
final public static int APR_OC_REASON_UNWRITABLE(Code)
write_fd is unwritable



APR_PARENT_BLOCK
final public static int APR_PARENT_BLOCK(Code)



APR_PROC_DETACH_DAEMONIZE
final public static int APR_PROC_DETACH_DAEMONIZE(Code)
Do not detach



APR_PROC_DETACH_FOREGROUND
final public static int APR_PROC_DETACH_FOREGROUND(Code)



APR_PROC_EXIT
final public static int APR_PROC_EXIT(Code)
do not wait -- just see if it has finished



APR_PROC_SIGNAL
final public static int APR_PROC_SIGNAL(Code)
process exited normally



APR_PROC_SIGNAL_CORE
final public static int APR_PROC_SIGNAL_CORE(Code)
process exited due to a signal



APR_PROGRAM
final public static int APR_PROGRAM(Code)
use the shell to invoke the program



APR_PROGRAM_ENV
final public static int APR_PROGRAM_ENV(Code)
invoke the program directly, no copied env



APR_PROGRAM_PATH
final public static int APR_PROGRAM_PATH(Code)
invoke the program, replicating our environment



APR_SHELLCM
final public static int APR_SHELLCM(Code)



APR_SHELLCMD_ENV
final public static int APR_SHELLCMD_ENV(Code)
find program on PATH, use our environment



APR_WAIT
final public static int APR_WAIT(Code)
use the shell to invoke the program, replicating our environment



MAX_ARGS_SIZE
final public static int MAX_ARGS_SIZE(Code)
Detach



MAX_ENV_SIZE
final public static int MAX_ENV_SIZE(Code)





Method Detail
alloc
native public static long alloc(long cont)(Code)
Allocate apr_proc_t stucture from pool This is not an apr function.
Parameters:
  cont - The pool to use.



create
native public static int create(long proc, String progname, String[] args, String[] env, long attr, long pool)(Code)
Create a new process and execute a new program within that process. This function returns without waiting for the new process to terminate; use apr_proc_wait for that.
Parameters:
  progname - The program to run
Parameters:
  args - The arguments to pass to the new program. The firstone should be the program name.
Parameters:
  env - The new environment table for the new process. Thisshould be a list of NULL-terminated strings. This argumentis ignored for APR_PROGRAM_ENV, APR_PROGRAM_PATH, andAPR_SHELLCMD_ENV types of commands.
Parameters:
  attr - The procattr we should use to determine how to create the newprocess
Parameters:
  pool - The pool to use. The resulting process handle.



detach
native public static int detach(int daemonize)(Code)
Detach the process from the controlling terminal.
Parameters:
  daemonize - set to non-zero if the process should daemonizeand become a background process, else it willstay in the foreground.



fork
native public static int fork(long[] proc, long cont)(Code)
This is currently the only non-portable call in APR. This executes a standard unix fork.
Parameters:
  proc - The resulting process handle.
Parameters:
  cont - The pool to use. APR_INCHILD for the child, and APR_INPARENT for the parentor an error.



kill
native public static int kill(long proc, int sig)(Code)
Terminate a process.
Parameters:
  proc - The process to terminate.
Parameters:
  sig - How to kill the process.



wait
native public static int wait(long proc, int[] exit, int waithow)(Code)
Wait for a child process to die
Parameters:
  proc - The process handle that corresponds to the desired child process
Parameters:
  exit - exit[0] The returned exit status of the child, if a child processdies, or the signal that caused the child to die.On platforms that don't support obtaining this information,the status parameter will be returned as APR_ENOTIMPL.exit[1] Why the child died, the bitwise or of:
APR_PROC_EXIT         -- process terminated normallyAPR_PROC_SIGNAL       -- process was killed by a signalAPR_PROC_SIGNAL_CORE  -- process was killed by a signal, andgenerated a core dump.

Parameters:
  waithow - How should we wait. One of:
APR_WAIT   -- block until the child process dies.APR_NOWAIT -- return immediately regardless of if thechild is dead or not.
The childs status is in the return code to this process. It is one of:
APR_CHILD_DONE     -- child is no longer running.APR_CHILD_NOTDONE  -- child is still running.



waitAllProcs
native public static int waitAllProcs(long proc, int[] exit, int waithow, long pool)(Code)
Wait for any current child process to die and return information about that child.
Parameters:
  proc - Pointer to NULL on entry, will be filled out with child'sinformation
Parameters:
  exit - exit[0] The returned exit status of the child, if a child processdies, or the signal that caused the child to die.On platforms that don't support obtaining this information,the status parameter will be returned as APR_ENOTIMPL.exit[1] Why the child died, the bitwise or of:
APR_PROC_EXIT         -- process terminated normallyAPR_PROC_SIGNAL       -- process was killed by a signalAPR_PROC_SIGNAL_CORE  -- process was killed by a signal, andgenerated a core dump.

Parameters:
  waithow - How should we wait. One of:
APR_WAIT   -- block until the child process dies.APR_NOWAIT -- return immediately regardless of if thechild is dead or not.

Parameters:
  pool - Pool to allocate child information out of.



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.