org.codehaus.enunciate.modules.amf
Class JAXRSProvider

java.lang.Object
  extended by org.codehaus.enunciate.modules.amf.JAXRSProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader, javax.ws.rs.ext.MessageBodyWriter

@Provider
public class JAXRSProvider
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyReader, javax.ws.rs.ext.MessageBodyWriter

A JAX-RS provider for data that is serialized/deserialized according to the AMF specification for serialization of objects. E.g. mime type "application/x-amf".

Author:
Ryan Heaton

Constructor Summary
JAXRSProvider()
           
 
Method Summary
 AMFDataReader getReader()
           
 long getSize(java.lang.Object o, java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 AMFDataWriter getWriter()
           
 boolean isReadable(java.lang.Class realType, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(java.lang.Class realType, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 java.lang.Object readFrom(java.lang.Class realType, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap httpHeaders, java.io.InputStream stream)
           
 void setReader(AMFDataReader reader)
           
 void setWriter(AMFDataWriter writer)
           
 void writeTo(java.lang.Object o, java.lang.Class realType, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap httpHeaders, java.io.OutputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXRSProvider

public JAXRSProvider()
Method Detail

isReadable

public boolean isReadable(java.lang.Class realType,
                          java.lang.reflect.Type genericType,
                          java.lang.annotation.Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader

readFrom

public java.lang.Object readFrom(java.lang.Class realType,
                                 java.lang.reflect.Type genericType,
                                 java.lang.annotation.Annotation[] annotations,
                                 javax.ws.rs.core.MediaType mediaType,
                                 javax.ws.rs.core.MultivaluedMap httpHeaders,
                                 java.io.InputStream stream)
                          throws java.io.IOException,
                                 javax.ws.rs.WebApplicationException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException

isWriteable

public boolean isWriteable(java.lang.Class realType,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter

writeTo

public void writeTo(java.lang.Object o,
                    java.lang.Class realType,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap httpHeaders,
                    java.io.OutputStream stream)
             throws java.io.IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException

getSize

public long getSize(java.lang.Object o,
                    java.lang.Class type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter

getReader

public AMFDataReader getReader()

setReader

public void setReader(AMFDataReader reader)

getWriter

public AMFDataWriter getWriter()

setWriter

public void setWriter(AMFDataWriter writer)