Apache CXF API

org.apache.cxf.jaxrs.provider
Class AbstractJAXBProvider

java.lang.Object
  extended by org.apache.cxf.jaxrs.provider.AbstractJAXBProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
Direct Known Subclasses:
JAXBElementProvider, JSONProvider

public abstract class AbstractJAXBProvider
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>


Field Summary
protected  javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext> resolver
           
 
Constructor Summary
AbstractJAXBProvider()
           
 
Method Summary
protected  java.lang.Object checkAdapter(java.lang.Object obj, java.lang.annotation.Annotation[] anns)
           
protected  javax.xml.bind.Marshaller createMarshaller(java.lang.Object obj, java.lang.Class<?> cls, java.lang.reflect.Type genericType, javax.ws.rs.core.MediaType m)
           
protected  java.lang.Class<?> getActualType(java.lang.Class<?> type, java.lang.reflect.Type genericType)
           
protected  javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class<?> type, java.lang.reflect.Type genericType)
           
 long getSize(java.lang.Object o)
           
 boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
           
protected  boolean isSupported(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] anns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ws.rs.ext.MessageBodyReader
readFrom
 
Methods inherited from interface javax.ws.rs.ext.MessageBodyWriter
writeTo
 

Field Detail

resolver

@Context
protected javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext> resolver
Constructor Detail

AbstractJAXBProvider

public AbstractJAXBProvider()
Method Detail

isWriteable

public boolean isWriteable(java.lang.Class<?> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] anns)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>

isReadable

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

getSize

public long getSize(java.lang.Object o)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>

getJAXBContext

protected javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class<?> type,
                                                    java.lang.reflect.Type genericType)
                                             throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

isSupported

protected boolean isSupported(java.lang.Class<?> type,
                              java.lang.reflect.Type genericType,
                              java.lang.annotation.Annotation[] annotations)

createMarshaller

protected javax.xml.bind.Marshaller createMarshaller(java.lang.Object obj,
                                                     java.lang.Class<?> cls,
                                                     java.lang.reflect.Type genericType,
                                                     javax.ws.rs.core.MediaType m)
                                              throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

getActualType

protected java.lang.Class<?> getActualType(java.lang.Class<?> type,
                                           java.lang.reflect.Type genericType)

checkAdapter

protected java.lang.Object checkAdapter(java.lang.Object obj,
                                        java.lang.annotation.Annotation[] anns)

Apache CXF API

Apache CXF