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 "Benoit Tellier (Jira)" <ji...@apache.org> on 2019/12/06 07:06:00 UTC
[jira] [Created] (PROTOCOLS-120) Modularize IMAP propotocol
Benoit Tellier created PROTOCOLS-120:
----------------------------------------
Summary: Modularize IMAP propotocol
Key: PROTOCOLS-120
URL: https://issues.apache.org/jira/browse/PROTOCOLS-120
Project: James Protocols
Issue Type: Improvement
Components: imap
Reporter: Benoit Tellier
Assignee: Eric Charles
# Context
IMAP components relies on chaining. When we handle an item, be it in encoder, decoders or protocols, we have a chain of handlers (manually formed), and each handler see if it can handle the item, until one handler processes it.
This approach have several caveats:
- Chaining is done with an intermediate abstract class (verbose)
- It is hard to add an element in the chain
- Which is not easily customisable
- This approach furthermore defeats injection frameworks.
# Proposition
Use a registery instead.
Each handler indicates which class it handles.
From the registry we can select directly the handler we want.
# Consequence
Handler no longer need to be chained together.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org