Re: ResponseBuilder

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 13 Jun 2008 09:13:48 -0400

On Jun 12, 2008, at 4:57 PM, Marc Hadley wrote:
>> If calling ResponseBuilder.type(String), must the String be
>> converted to a MediaType? Or ResponseBuilder.type(MediaType) be
>> converted to a String? Or should it not changed in both cases? This
>> should be clear if a message body writer would reads data from the
>> Response for necessary casts. A javadoc clarification on both
>> ResponseBuilder.type(.) methods and Response.getMetadata() would be
>> good.
>> The same issue exists for both ResponseBuilder.tag(.)
> I propose we convert to instances of MediaType and EntityTag.
Thinking about this some more I think it would be better to just leave
the value as the type it was set. There's a straightforward way to get
the string value of any header by using the toString method of the
value object and we supply the mediaType as a MediaType anyway.


>> If HttpHeaders.getAcceptedLanguages() returns List<Locale>, than we
>> should also add ResponseBuilder.language(Locale) and the conversion
>> be documented.
> Yes.
> While we are thinking about Locale, anyone have an objection to
> closing issue 42 by switching from String to Locale:
> Marc.
> ---
> Marc Hadley <marc.hadley at>
> CTO Office, Sun Microsystems.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.