All,

I'm submitting this one file separate from the others because the
changes here are more extensive.  They are similar to the changes
described earlier for SMTPHandler.java.  Specifically:

The specific changes include:

All methods and variables were documented, if only minimally.

A couple of instance variables were converted to static variables -
softwareType, which is just a String describing the POP3Handler, is now
static.  The SMTP ID generating variable random is now static.  There is
synchronized access to this variable to ensure thread safety.
 
All string concatenations involving more than two strings were converted
into StringBuffer expressions.  Strings are now concatenated using the
append method of the StringBuffer class.  Two string concatenations were
not converted because there is no significant performance increase
associated with that conversion.  This is a resolution for bug #11235 as
far as this file is concerned.

Some wrappers were added to a number of the logging statements.  These
wrappers check if the logger being used supports the logging level
before constructing the composite string to be sent to the logger.  This
makes the handler more efficient when running in non-DEBUG mode.

The responses sent by the POP3 handler are now logged at a DEBUG log
level.  Before, only the commands received from the client were logged.
IMHO this made it difficult to debug the POP3 exchange in certain
circumstances.  So I added code to record this side of the
communication.

The commands received from the client are now logged at a DEBUG log
level, rather than at the INFO level.  This seemed more appropriate for
this sort of low level communication.  Each incoming connection is still
recorded at an INFO level in the log.

Flush statements were added at several points to ensure that the server
responses are sent to the client in a timely fashion.

Comments, criticisms, and questions are always welcome.

--Peter

Attachment: POP3Handler.java.diff
Description: Binary data

Attachment: POP3Handler.java
Description: java/

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

Reply via email to