tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/invocation/src/share/org/apache/invocation package.html
Date Fri, 22 Sep 2000 01:54:15 GMT
pier        00/09/21 18:54:14

  Modified:    invocation README
  Added:       invocation/src/share/org/apache/invocation package.html
  Log:
  Updated documentation.
  
  Revision  Changes    Path
  1.2       +3 -3      jakarta-tomcat-4.0/invocation/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/invocation/README,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README	2000/09/21 23:22:22	1.1
  +++ README	2000/09/22 01:54:11	1.2
  @@ -23,7 +23,7 @@
       sent to running processes expands the invocation paradigm, so that,
       after the service process is usually started with a call to the
       main(int argc, char *argv[]) function, signal handling provides
  -    alternate ways to invoke the process.
  +    alternate ways to trigger events inside the process.
   
       For example, it usually happens that UNIX daemons upon reception of
       the HUP signal, the service is stopper, configuration are re-read
  @@ -90,6 +90,6 @@
   
   -------------------------------------------------------------------------
   Copyright (c) 2000  The Apache Software Foundation.  All rights reserved.             
             *
  -- $Revision: 1.1 $
  -- $Date: 2000/09/21 23:22:22 $
  +- $Revision: 1.2 $
  +- $Date: 2000/09/22 01:54:11 $
   -------------------------------------------------------------------------
  
  
  
  1.1                  jakarta-tomcat-4.0/invocation/src/share/org/apache/invocation/package.html
  
  Index: package.html
  ===================================================================
  <html>
    <body>
      <p>
        This package abstract the idea of a generic Java based service wich
        can be started, restarted and stopped in consequence of operating
        system calls or events.
      </p>
  
      <p>
        While the usual <code>main(String&nbsp;args[])</code> method is 
        well suited for generic applications, having only one entry point 
        when developing services is not enough.
      </p>
  
      <p>
        In UNIX based operating systems, for example, a set of signals to 
        be sent to running processes expands the invocation paradigm, so 
        that, after the service process is usually started with a call to 
        the <code>main(int argc, char *argv[])</code> function, signal 
        handling provides alternate ways to trigger events inside the
        process.
      </p>
  
      <p>
        For example, it usually happens that UNIX daemons upon reception of 
        the HUP signal, the service is stopper, configuration are re-read 
        from disk, and the service is started againg with the new 
        configurations, or, upon reception of a TERM signal, the service is 
        stopped (freeing all resources allocated) and the process is 
        terminated.
      </p>
  
      <p>
        The org.apache.invocation.InvocationAbstraction interface works in 
        the same way. It defines three major entry points:
      </p>
  
      <table width="100%">
        <tr>
          <td width="5%"></td>
          <td>
            <table border="1" cellpadding="3" cellspacing="0" width="100%">
              <tr bgcolor="#eeeeff" class="TableSubHeadingColor">
                <td><b>Method</b></td>
                <td><b>Description</b></td>
              </tr>
              <tr bgcolor="#ffffff" class="TableRowColor">
                <td><code>start&nbsp;(...)</code></td>
                <td>
                  This method is the parallel to the 
                  <code>main(String&nbsp;args[])</code> method used by 
                  applications. Command line parameters are passed to the 
                  instance and the service is started.
                </td>
              </tr>
              <tr bgcolor="#ffffff" class="TableRowColor">
                <td><code>restart&nbsp;()</code></td>
                <td>
                  This method is called when the service must be stopped, 
                  configurations re-read from the disk, and the service 
                  brought back on line with the new configuration. It's 
                  behaviour is similar to the usual behaviour of the HUP 
                  signal in unix daemons.
                </td>
              </tr>
              <tr bgcolor="#ffffff" class="TableRowColor">
                <td><code>stop&nbsp;()</code></td>
                <td>
                  This method is called before the Java VM is terminated. 
                  The service should release all resources allocated during 
                  its execution, save temporary data, and be prepared to 
                  exit. It's behaviour is similar to the usual behaviour of 
                  the TERM signal in unix daemons.
                </td>
              </tr>
            </table>
          </td>
          <td width="5%"></td>
        </tr>
      </table>
    </body>
  </html>
  
  

Mime
View raw message