pgoldstein    2002/08/15 14:57:28

  Modified:    src/java/org/apache/james/pop3server POP3Handler.java
                        POP3Server.java
  Added:       src/java/org/apache/james/pop3server package.html
  Log:
  Added extensive commenting.
  
  Revision  Changes    Path
  1.9       +6 -8      
jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java
  
  Index: POP3Handler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- POP3Handler.java  7 Aug 2002 23:54:34 -0000       1.8
  +++ POP3Handler.java  15 Aug 2002 21:57:27 -0000      1.9
  @@ -112,9 +112,7 @@
   
   
       /**
  -     * This method is called by the ConnectionHandlerFactory with the
  -     * handler <code>Configuration</code>.  This provides the POP3Handler
  -     * with required configuration data.
  +     * Pass the <code>Configuration</code> to the instance.
        *
        * @param configuration the class configurations.
        * @throws ConfigurationException if an error occurs
  @@ -127,9 +125,9 @@
       }
   
       /**
  -     * This method is called by the ConnectionHandlerFactory with the
  -     * appropriate <code>ComponentManager</code>.  This allows the POP3Handler
  -     * to access other system components.
  +     * Pass the <code>ComponentManager</code> to the <code>composer</code>.
  +     * The instance uses the specified <code>ComponentManager</code> to 
  +     * acquire the components it needs for execution.
        *
        * @param componentManager The <code>ComponentManager</code> which this
        *                <code>Composable</code> uses.
  @@ -151,8 +149,8 @@
        * This handler is responsible for processing connections as they occur.
        *
        * @param connection the connection
  -     * @exception IOException if an error reading from socket occurs
  -     * @exception ProtocolException if an error handling connection occurs
  +     * @throws IOException if an error reading from socket occurs
  +     * @throws ProtocolException if an error handling connection occurs
        */
       public void handleConnection( Socket connection )
               throws IOException {
  
  
  
  1.7       +29 -0     
jakarta-james/src/java/org/apache/james/pop3server/POP3Server.java
  
  Index: POP3Server.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Server.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- POP3Server.java   12 Aug 2002 18:51:11 -0000      1.6
  +++ POP3Server.java   15 Aug 2002 21:57:28 -0000      1.7
  @@ -18,17 +18,32 @@
   import java.net.UnknownHostException;
   
   /**
  + * <p>Accepts POP3 connections on a server socket and dispatches them to 
POP3Handlers.</p>
  + *
  + * <p>Also responsible for loading and parsing POP3 specific configuration.</p>
  + *
    * @version 1.0.0, 24/04/1999
    * @author  Federico Barbieri <[EMAIL PROTECTED]>
    */
   public class POP3Server
       extends AbstractService implements Component {
   
  +    /**
  +     * Creates a subclass specific handler factory for use by the superclass.
  +     *
  +     * @return a ConnectionHandlerFactory that produces POP3Handlers
  +     */
       protected ConnectionHandlerFactory createFactory()
       {
           return new DefaultHandlerFactory( POP3Handler.class );
       }
   
  +    /**
  +     * Pass the <code>Configuration</code> to the instance.
  +     *
  +     * @param configuration the class configurations.
  +     * @throws ConfigurationException if an error occurs
  +     */
       public void configure( final Configuration configuration )
           throws ConfigurationException {
   
  @@ -55,6 +70,13 @@
           super.configure( configuration.getChild( "handler" ) );
       }
   
  +    /**
  +     * Initialize the component. Initialization includes
  +     * allocating any resources required throughout the
  +     * components lifecycle.
  +     *
  +     * @throws Exception if an error occurs
  +     */
       public void initialize() throws Exception {
           getLogger().info( "POP3Server init..." );
           StringBuffer logBuffer =
  @@ -71,6 +93,13 @@
           System.out.println("Started POP3 Server " + m_connectionName);
       }
   
  +    /**
  +     * The dispose operation is called at the end of a components lifecycle.
  +     * Instances of this class use this method to release and destroy any
  +     * resources that they own.
  +     *
  +     * @throws Exception if an error is encountered during shutdown
  +     */
       public void dispose()
       {
           getLogger().info( "POP3Server dispose..." );
  
  
  
  1.1                  jakarta-james/src/java/org/apache/james/pop3server/package.html
  
  Index: package.html
  ===================================================================
  <body>
  <p>Provides classes implementing POP3 functionality.</p>
  </body>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to