On Nov 8, 2007, at 9:27 PM, Marc Hadley wrote:
> 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.
>
Sorry if I'm too late. I thought about including the fact that one's a
request and the other is a response in the names, but that would of
course conflict with a potential client API. So:
+1 (to both the name change and the split into two interfaces).
Stefan
--
Stefan Tilkov, http://www.innoq.com/blog/st/
> Thanks,
> Marc.
>
> 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 sun.com>
> CTO Office, Sun Microsystems.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>
>