James Server
  1. James Server
  2. JAMES-347

make POP3Handler.java/POP3Server.java and AvalonUsersStore.java extensible

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 3.0-M1, 3.0.0
    • Component/s: POP3Server
    • Labels:
      None
    • Environment:
      any

      Description

      As discussed in James 288, my application of james i) needs more memory efficiency and ii) unfortunately needs to remain with "db store" and iii) adds some extra logic to the pop implementation (see http://p4u.ch)

      In order to allow for such extensions without requiring duplication of existing code that is perfectly ok for my purposes (most of the POP3Handler.do*() methods), it would great if
      1) the methods of POP3Handler.java would not be of type "private" such that classes extending POP3Handler.java could use them if there is no need to overwrite them (the same applies to the "final static String OK_RESPONSE="... and alike) even if the extending class is not in the same directory
      2) similarly, make org.apache.james.core.AvalonUsersStore extensible by making its contents also accessible to extending classes thereof (the methods are "public", but the content only "protected" - so either provide getters and setters or make them public)
      3) ditto org.apache.james.pop3server.POP3Server - then I could specify the extended class in james-assembly without having to copy all unchanged methods. If in org.apache.james.pop3server.POP3Server.POP3HandlerFactory.newInstance() were to create a configurable handler object as suggested in "4)" and not the hard-coded POP3Handler, extending the POP3Server might not even be necessary
      4) in the config, allow to specify other (extended) classes for james-assembly's role="org.apache.james.services.UsersStore" much like the struts-config.xml's <message-resources null="false" ...
      className="...MessageResourcesConfigExtension" /> does where either the default class is used or an own implementation will be used

      • another little difficulty is that it doesn't appear to be possible to use an extended UserStore just for pop3server, but not the others since ins assembly.xml, I can only specify one user-store in the <!-- The User Storage block --> <block name="users-store"
      • furthermore, the compose method of each AbstractJamesService such as org.apache.james.smtpserver.SMTPServer all lookup("org.apache.james.services.UsersStore") that is hard-coded
      • also, that compose() method is executed even if though my config.xml says <smtpserver enabled="false">

      Reasons for doing all these extensions:

      • above-mentioined efficiency
      • being able to provide error messages in the user's language (nls/i18n)
      • being able to perform the authentication test with additional parameters such as remotehost, etc., SSL session ID, ...
      • additional security/privacy/DSN logic as implemented http://p4u.ch

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ralf Hauser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development