org.apache.wink.providers.jettison
Class JettisonJAXBProvider

java.lang.Object
  extended by org.apache.wink.common.internal.providers.entity.xml.AbstractJAXBProvider
      extended by org.apache.wink.providers.jettison.JettisonJAXBProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>

@Provider
public class JettisonJAXBProvider
extends org.apache.wink.common.internal.providers.entity.xml.AbstractJAXBProvider
implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>

A Jettison JAXB provider. By default, use the MappedNamespace convention. Namespace mapping needs to be set if namespaces are used. In Application sub-class, use Application.getSingletons() to add to application.


Field Summary
 
Fields inherited from class org.apache.wink.common.internal.providers.entity.xml.AbstractJAXBProvider
contextCacheOn, jaxbTypeMapCache, providers
 
Constructor Summary
JettisonJAXBProvider()
           
JettisonJAXBProvider(boolean isBadgerFishConventionUsed, org.codehaus.jettison.mapped.Configuration reader, org.codehaus.jettison.mapped.Configuration writer)
           
 
Method Summary
 long getSize(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 java.lang.Object readFrom(java.lang.Class<java.lang.Object> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)
           
 void setUseAsReader(boolean isReadable)
           
 void setUseAsWriter(boolean isWritable)
           
 void writeTo(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
           
 
Methods inherited from class org.apache.wink.common.internal.providers.entity.xml.AbstractJAXBProvider
closeXMLStreamReader, getConcreteTypeFromTypeMap, getContext, getContext, getEntityToMarshal, getJAXBMarshaller, getJAXBUnmarshaller, getXMLStreamReader, getXMLStreamReader, isCompatible, isJAXBElement, isJAXBObject, isJAXBObject, isSupportedMediaType, marshalWithXmlAdapter, releaseJAXBMarshaller, releaseJAXBUnmarshaller, unmarshalWithXmlAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JettisonJAXBProvider

public JettisonJAXBProvider()

JettisonJAXBProvider

public JettisonJAXBProvider(boolean isBadgerFishConventionUsed,
                            org.codehaus.jettison.mapped.Configuration reader,
                            org.codehaus.jettison.mapped.Configuration writer)
Method Detail

setUseAsReader

public void setUseAsReader(boolean isReadable)

setUseAsWriter

public void setUseAsWriter(boolean isWritable)

isReadable

public boolean isReadable(java.lang.Class<?> type,
                          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<java.lang.Object>

readFrom

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

getSize

public long getSize(java.lang.Object t,
                    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<java.lang.Object>

isWriteable

public boolean isWriteable(java.lang.Class<?> type,
                           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<java.lang.Object>

writeTo

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


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.