Apache AWF
  1. Apache AWF
  2. AWF-177

Create an Interface between the API user and deft internal plumbing system

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:
      None

      Description

      here a patch for creating two interface : HttpResponse and HttpRequest (implementation are moved to HttpResponseImpl and HttpRequestImpl).
      We expose to the deft user only those interfaces (with the javadoc as API documentation) and hide all the parsing/accumulation process.

      The idea is :

      • hide the complexity to the user, provide clear API with it's doc
      • prevent user to call unwanted methods
      • being able to change the inner implementatio without affecting user code
      1. HttpResponseImpl.java
        11 kB
        Julien Vermillard
      2. HttpRequestImpl.java
        12 kB
        Julien Vermillard
      3. HttpRequestImpl.java
        12 kB
        Julien Vermillard
      4. api.patch
        177 kB
        Julien Vermillard

        Activity

        Hide
        Julien Vermillard added a comment -

        looks fine for me, yep there is something to do about package organization

        If you look for an eclipse fomater, here the MINA one (java convention with space in place of tabs) :
        http://mina.apache.org/developer-guide.data/ImprovedJavaConventions.xml

        Show
        Julien Vermillard added a comment - looks fine for me, yep there is something to do about package organization If you look for an eclipse fomater, here the MINA one (java convention with space in place of tabs) : http://mina.apache.org/developer-guide.data/ImprovedJavaConventions.xml
        Hide
        Johnathan Meehan added a comment -

        +1 for the extraction (the package is starting to look a little random now to me; might get to that).

        Show
        Johnathan Meehan added a comment - +1 for the extraction (the package is starting to look a little random now to me; might get to that).
        Hide
        Johnathan Meehan added a comment -

        I ran through it all and applied the changes with only minor changes. You're going to hate me, Julien, but I had to run my own formatter to see what was what... we should have a standard formatter available soon (or so I keep saying). I'm pretty sure it's all there, though. Let me know if I missed something

        Committed: http://svn.apache.org/viewvc?rev=1153593&view=rev

        Ready for review.

        Show
        Johnathan Meehan added a comment - I ran through it all and applied the changes with only minor changes. You're going to hate me, Julien, but I had to run my own formatter to see what was what... we should have a standard formatter available soon (or so I keep saying). I'm pretty sure it's all there, though. Let me know if I missed something Committed: http://svn.apache.org/viewvc?rev=1153593&view=rev Ready for review.
        Hide
        Julien Vermillard added a comment -

        Hi,
        Sorry for the formatting I fogot my eclipse is configured on autoformat on save

        Yes it's exactly what you described plus some javadocing on the interfaces (API doco).

        Show
        Julien Vermillard added a comment - Hi, Sorry for the formatting I fogot my eclipse is configured on autoformat on save Yes it's exactly what you described plus some javadocing on the interfaces (API doco).
        Hide
        Johnathan Meehan added a comment -

        Hi, Julien!
        The formatting differences make it a little confusing, but from a quick glance this is a straight Extract Interface refactoring with references to the new implementation added as needed right? Sounds like a good idea.
        If nobody else gets to it first, I will take a proper look at this for you tomorrow. In the meantime could you please upload "HttpRequestImpl.java" again, and check the "Grant Rights" box?

        Show
        Johnathan Meehan added a comment - Hi, Julien! The formatting differences make it a little confusing, but from a quick glance this is a straight Extract Interface refactoring with references to the new implementation added as needed right? Sounds like a good idea. If nobody else gets to it first, I will take a proper look at this for you tomorrow. In the meantime could you please upload "HttpRequestImpl.java" again, and check the "Grant Rights" box?

          People

          • Assignee:
            Johnathan Meehan
            Reporter:
            Julien Vermillard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development