You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Stefano Bagnara <ap...@bago.org> on 2006/05/08 00:54:22 UTC
James Handlers refactoring (Was: svn commit: r404864)
I committed this as a work-in-progress proposal.
I'm happy with the result, so far, but it comes with a drawback.
In order to put most code in commons I had to change the "reader" used
by the RemoteManager from a BufferedReader to a CRLFTerminatedReader.
Imho this is not a big issue and most "telnet based" protocol enforce
this rule, but this introduce a small backward incompatibility issue.
The next step would be to separate commands in CmdHandler for
NNTP/RemoteManager and POP3 like we did for SMPTServer.
This would be a better structure to start adding new remoteManager
commands Norman already submitted to JIRA.
Please review the changes in *Handler and *Server and tell me what you
think.
Stefano
PS: Overall the refactoring on the Handler stuff reduced the source size
of James of 20K and remove a lot of duplicate code.
bago@apache.org wrote:
> Author: bago
> Date: Sun May 7 15:36:08 2006
> New Revision: 404864
>
> URL: http://svn.apache.org/viewcvs?rev=404864&view=rev
> Log:
> Further generalization in protocol handling. Now the 4 specific protocol handler are Avalon free (all the avalon stuff is in the AbstractJamesHandler) and they share most of the low-level protocol code.
> Please note that RemoteManagerHandler now uses the CRLFInputStreamReader so it now mandate a CRLF based communication.
>
> Modified:
> james/server/trunk/src/java/org/apache/james/core/AbstractJamesHandler.java
> james/server/trunk/src/java/org/apache/james/nntpserver/NNTPHandler.java
> james/server/trunk/src/java/org/apache/james/pop3server/POP3Handler.java
> james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManagerHandler.java
> james/server/trunk/src/java/org/apache/james/smtpserver/SMTPHandler.java
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org