Errai 3.0.1-SNAPSHOT

org.jboss.errai.jaxrs
Class ErraiProvider

java.lang.Object
  extended by org.jboss.errai.jaxrs.ErraiProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

@Provider
public class ErraiProvider
extends Object
implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

Provider for serialization/deserialization of Errai objects.

Author:
Christian Sadilek

Constructor Summary
ErraiProvider()
           
 
Method Summary
 long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
           
 void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErraiProvider

public ErraiProvider()
Method Detail

isReadable

public boolean isReadable(Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>

isWriteable

public boolean isWriteable(Class<?> type,
                           Type genericType,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>

getSize

public long getSize(Object t,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<Object>

writeTo

public void writeTo(Object t,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
                    OutputStream entityStream)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
Throws:
IOException
javax.ws.rs.WebApplicationException

readFrom

public Object readFrom(Class<Object> type,
                       Type genericType,
                       Annotation[] annotations,
                       javax.ws.rs.core.MediaType mediaType,
                       javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
                       InputStream entityStream)
                throws IOException,
                       javax.ws.rs.WebApplicationException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<Object>
Throws:
IOException
javax.ws.rs.WebApplicationException

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.