Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-225

simplify fluent Message API

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.3-incubating
    • 0.3-incubating
    • I18n-Module
    • None

    Description

      We currently have a pretty complex fluent API for our message stuff. Imo a bit too fluent. The main focus is on always creating immutable objects, but this causes quite some overhead. In fact, the MessageContext itself is always being created as @Dependent scoped bean, thus chances to modify a MessageContext in concurrent manner is not high. Thus we could easily merge MessageContext with MessageContext.Config - we just need to make people aware that they change the MessageContext itself with the fluent API (builder pattern). We can also add a cloneContext() method which will create a new instance based on the current configuration.

      The same simplification can be done with MessageBuilder with Message. It doesn't make much sense to distinct between a MessageBuilder#addArguments(...) and Message#addArguments(...). They really do the same.

      Attachments

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: