Apache CXF API

org.apache.cxf.jaxrs.provider
Class AbstractJAXBProvider

java.lang.Object
  extended by org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
      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 AbstractConfigurableProvider
implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>


Field Summary
protected static java.util.ResourceBundle BUNDLE
           
 
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  javax.xml.bind.Unmarshaller createUnmarshaller(java.lang.Class<?> cls, java.lang.reflect.Type genericType)
           
protected  java.lang.Class<?> getActualType(java.lang.Class<?> type, java.lang.reflect.Type genericType)
           
protected  MessageContext getContext()
           
protected  javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class<?> type, java.lang.reflect.Type genericType)
           
protected  javax.xml.validation.Schema getSchema()
           
 long getSize(java.lang.Object o)
           
protected static void handleJAXBException(javax.xml.bind.JAXBException e)
           
 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)
           
protected  void setContext(MessageContext context)
           
 void setSchema(javax.xml.validation.Schema s)
           
 void setSchemaLocations(java.util.List<java.lang.String> locations)
           
 
Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
getConsumeMediaTypes, getProduceMediaTypes, setConsumeMediaTypes, setProduceMediaTypes
 
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

BUNDLE

protected static final java.util.ResourceBundle BUNDLE
Constructor Detail

AbstractJAXBProvider

public AbstractJAXBProvider()
Method Detail

setContext

protected void setContext(MessageContext context)

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>

setSchemaLocations

public void setSchemaLocations(java.util.List<java.lang.String> locations)

getSize

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

setSchema

public void setSchema(javax.xml.validation.Schema s)

getContext

protected MessageContext getContext()

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)

createUnmarshaller

protected javax.xml.bind.Unmarshaller createUnmarshaller(java.lang.Class<?> cls,
                                                         java.lang.reflect.Type genericType)
                                                  throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

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)

getSchema

protected javax.xml.validation.Schema getSchema()

handleJAXBException

protected static void handleJAXBException(javax.xml.bind.JAXBException e)

Apache CXF API

Apache CXF