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 09:00:00 UTC

[jira] [Commented] (PROTOCOLS-120) Modularize IMAP propotocol

    [ https://issues.apache.org/jira/browse/PROTOCOLS-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989542#comment-16989542 ] 

Benoit Tellier commented on PROTOCOLS-120:
------------------------------------------

https://github.com/linagora/james-project/pull/2965 proposes modularity for the encoder chain

https://github.com/linagora/james-project/pull/2967 enhances modularity of the decoder chain

These components would be ready for being pushed with minimal efforts into a dependency injection system like Guice.

> 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
>            Priority: Major
>
> # 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