[jax-rs-spec users] [jsr339-experts] Header builder class hierarchy simplification

From: Marek Potociar <>
Date: Mon, 05 Dec 2011 11:29:06 +0100

Hi *,
as discussed some time ago, the extended hierarchy of header and header builder interfaces was temporary until things
settle down more with req/resp related components. I think the method structure is currently stable enough so it's time
to flatten the interfaces as promised earlier. I have made the necessary changes in the API source code.

Following is the outline of the change:

- Headers, Headers.Builder, RequestHeaders.Builder, ResponseHeaders.Builder interfaces were removed;
    - Headers merged into RequestHeaders and ResponseHeaders
    - Headers.Builder and RequestHeaders.Builder into Request.RequestBuilder
    - Headers.Builder and ResponseHeaders.Builder into Response.ResponseBuilder

- As part of this, I am also proposing converting inheritance relationship between Request & RequestHeaders /
Response & ResponseHeaders into composition - by introducing a new getHeaders() method on Request/Response and their

- In total, we are 4 interfaces down as a result of the API simplification.

Please review the proposed API change. Looking forward to your feedback.