RE: JSR311: ProviderFactory API needs a bit refactoring?

From: Larry Cable <>
Date: Thu, 8 Nov 2007 12:48:19 -0800


From: Marc Hadley
Sent: Thu 11/8/2007 12:27 PM
Subject: Re: JSR311: ProviderFactory API needs a bit refactoring?

Any further feedback on this before I make the change ? We'd like to
include this change in the 0.5 snapshot planned for the end of this
week to give the Jersey team a stable target.


On Nov 8, 2007, at 12:54 AM, Liu, Jervis wrote:
>> Something like:
>> public interface MessageBodyReader<T> {
>> boolean isReadable(Class<?> type);
>> T readFrom(Class<T> type, MediaType mediaType,
>> MultivaluedMap<String, String> httpHeaders,
>> InputStream entityStream) throws IOException;
>> }
>> and
>> public interface MessageBodyWriter<T> {
>> boolean isWriteable(Class<?> type);
>> void writeTo(T t, MediaType mediaType,
>> MultivaluedMap<String, Object> httpHeaders,
>> OutputStream entityStream) throws IOException;
>> long getSize(T t)
>> }
>> with the corresponding:
>> public abstract class ProviderFactory {
>> ...
>> public abstract <T> MessageBodyReader<T>
>> createMessageBodyReader(Class<T> type, MediaType media);
>> public abstract <T> MessageBodyWriter<T>
>> createMessageBodyWriter(Class<T> type, MediaType media);
>> }
> This looks good. Thanks.
> Jervis

Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.
To unsubscribe, e-mail:
For additional commands, e-mail:
Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.