users@jsr311.java.net

ResponseBuilder.type()

From: Sergey Beryozkin <sergey.beryozkin_at_iona.com>
Date: Thu, 19 Jun 2008 17:27:00 +0100

Hi

What effect, if any, the media type set in ResponseBuilder.type has on the MediaType parameter passed to MessageBodyWriter.writeTo()
?

Ex.

GET /bar
Accept : "application/bar"

@ProduceMime({"application/bar", "application/foo"})
void Response get() {
    return response.ok().type(""application/foo").entity(someEntity).build();
}

and

@ProduceMime("application/bar", "application/foo")
SomeProvider implements MessageBodyWriter...


Thanks, Sergey


----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland