Andrew Sykes wrote:
Stefano,

A more advanced task could be to generalize the Command Pattern used by the SMTPHandle so that we can use it for all ours telnet/command based protocols like POP3 and possibly as a base for IMAP too. The command patter is easy to adopt and it allow for more flexibility extensibility and a cleaner approach to the service creation/deploy.

Can you give an example of the type of generalisation you had in mind?

STMPHandler could be refactored to be protocol indipendend by moving the "mode" to the SMTPSession (or its SMTPSessions.State HashMap) and refactoring the loop inside the handleConnection.

POP3Handler could be refactored to use the same code of the SMTPHandler but using a different session/state/cmdhandlers.

Stefano

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

Reply via email to