Re: JSR311: GenericEntity + extending Response

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 20 Aug 2008 09:33:32 -0400

On Aug 20, 2008, at 2:47 AM, Paul Sandoz wrote:
>> For, spec says that "An application class
>> can extend this class directly or can use one the static methods to
>> create an instance using a ResponseBuilder."
>> The problem with this is that if the user sets the entity to be a
>> GenericEntity, the runtime has no way of getting at the type
>> information that GenericEntity is supposed to provide as
>> getEntity() is supposed to unwrap GenericEntity.
> That JavaDoc is written from the intent of the runtime processing a
> Response instance, but i think it can be made clearer. It is the
> runtime processing the response that checks if the entity is an
> instance of GenericEntity and if so unwraps the information in the
> GenericEntity instance.
Right. I'll try to make that clearer in the Javadoc, sorry for the


>> Either don't allow users to extend Response or add a
>> getGenericType() method to Response. I vote for adding a
>> getGenericType() method.
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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