com.adaptrex.core.rest.jaxrs
Class ModelJsonBodyWriter

java.lang.Object
  extended by com.adaptrex.core.rest.jaxrs.ModelJsonBodyWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<RestModel>

@Provider
public class ModelJsonBodyWriter
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<RestModel>


Constructor Summary
ModelJsonBodyWriter()
           
 
Method Summary
 long getSize(RestModel model, 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)
           
 void writeTo(RestModel model, Class<?> clazz, Type type, Annotation[] annotation, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> map, OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelJsonBodyWriter

public ModelJsonBodyWriter()
Method Detail

getSize

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

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<RestModel>

writeTo

public void writeTo(RestModel model,
                    Class<?> clazz,
                    Type type,
                    Annotation[] annotation,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<String,Object> map,
                    OutputStream out)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<RestModel>
Throws:
IOException
javax.ws.rs.WebApplicationException


Copyright © 2012 Adaptrex, LLC. All Rights Reserved.