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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to