org.skyscreamer.yoga.jaxrs.view
Class BaseYogaMessageBodyWriter

java.lang.Object
  extended by org.skyscreamer.yoga.jaxrs.view.BaseYogaMessageBodyWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<Object>
Direct Known Subclasses:
AbstractInjectedYogaMessageBodyWriter, AbstractYogaBuilderMessageBodyWriter

public class BaseYogaMessageBodyWriter
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<Object>


Field Summary
protected  javax.servlet.http.HttpServletRequest _request
           
protected  javax.servlet.http.HttpServletResponse _response
           
protected  AbstractYogaView _view
           
 
Constructor Summary
BaseYogaMessageBodyWriter(AbstractYogaView view)
           
 
Method Summary
 long getSize(Object value, Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 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
 

Field Detail

_request

@Context
protected javax.servlet.http.HttpServletRequest _request

_response

@Context
protected javax.servlet.http.HttpServletResponse _response

_view

protected AbstractYogaView _view
Constructor Detail

BaseYogaMessageBodyWriter

public BaseYogaMessageBodyWriter(AbstractYogaView view)
Method Detail

getSize

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

isWriteable

public boolean isWriteable(Class<?> clazz,
                           Type type,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable 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


Copyright © 2013. All Rights Reserved.