james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hb...@apache.org
Subject cvs commit: jakarta-james/src/org/apache/james/pop3server POP3Handler.java
Date Sun, 29 Apr 2001 07:42:49 GMT
hbedi       01/04/29 00:42:49

  Modified:    src/org/apache/james/pop3server POP3Handler.java
  Log:
  The Hello Name(greeting) is obtained from the configuration file.
  james/BaseConnectionHandler handles the hello name and other
  ConnectionHandlers derive from it.
  
  Revision  Changes    Path
  1.46      +4 -17     jakarta-james/src/org/apache/james/pop3server/POP3Handler.java
  
  Index: POP3Handler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/pop3server/POP3Handler.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- POP3Handler.java	2001/04/28 15:14:38	1.45
  +++ POP3Handler.java	2001/04/29 07:42:48	1.46
  @@ -41,6 +41,7 @@
   import org.apache.james.services.MailServer;
   import org.apache.james.services.UsersRepository;
   import org.apache.james.services.UsersStore;
  +import org.apache.james.BaseConnectionHandler;
   import org.apache.james.util.InternetPrintWriter;
   import org.apache.mailet.Mail;
   
  @@ -49,8 +50,8 @@
    * @version 0.9
    */
   public class POP3Handler
  -    extends AbstractLoggable
  -    implements ConnectionHandler, Contextualizable, Composable, Configurable, Target {
  +    extends BaseConnectionHandler
  +    implements ConnectionHandler, Composable, Configurable, Target {
   
       private String softwaretype        = "JAMES POP3 Server " + Constants.SOFTWARE_VERSION;
   
  @@ -59,7 +60,6 @@
       private MailRepository userInbox;
       private UsersRepository users;
       private TimeScheduler scheduler;
  -    private int timeout;
   
       private Socket socket;
       private BufferedReader in;
  @@ -67,7 +67,6 @@
       private OutputStream outs;
       private String remoteHost;
       private String remoteIP;
  -    private String servername;
       private int state;
       private String user;
       private Vector userMailbox = new Vector();
  @@ -81,18 +80,6 @@
       private final static String OK_RESPONSE = "+OK";
       private final static String ERR_RESPONSE = "-ERR";
   
  -    public void  contextualize( final Context context ) 
  -        throws ContextException {
  -        servername = (String)context.get( Constants.HELO_NAME );
  -        if ( servername == null )
  -            servername = "POP3Server";
  -    }
  -
  -    public void configure( final Configuration configuration )
  -        throws ConfigurationException {
  -        timeout = configuration.getChild( "connectiontimeout" ).getValueAsInteger( 120000
);
  -    }
  -
       public void compose( final ComponentManager componentManager )
           throws ComponentException {
           mailServer = (MailServer)componentManager.
  @@ -134,7 +121,7 @@
               scheduler.addTrigger( this.toString(), trigger, this );
               state = AUTHENTICATION_READY;
               user = "unknown";
  -            out.println( OK_RESPONSE + " " + this.servername +
  +            out.println( OK_RESPONSE + " " + this.helloName +
                            " POP3 server (" + this.softwaretype + ") ready " );
               while (parseCommand(in.readLine())) {
                   scheduler.resetTrigger(this.toString());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message