public abstract class AbstractJAXBElementProvider extends AbstractJAXBProvider<javax.xml.bind.JAXBElement<?>>
JAXBElement.
Implementing classes may extend this class to provide specific marshalling and unmarshalling behaviour.
When unmarshalling a UnmarshalException will result in a
WebApplicationException being thrown with a status of 400
(Client error), and a JAXBException will result in a
WebApplicationException being thrown with a status of 500
(Internal Server error).
When marshalling a JAXBException will result in a
WebApplicationException being thrown with a status of 500
(Internal Server error).
UTF8| Constructor and Description |
|---|
AbstractJAXBElementProvider(javax.ws.rs.ext.Providers ps) |
AbstractJAXBElementProvider(javax.ws.rs.ext.Providers ps,
javax.ws.rs.core.MediaType mt) |
| Modifier and Type | Method and Description |
|---|---|
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) |
protected abstract javax.xml.bind.JAXBElement<?> |
readFrom(java.lang.Class<?> type,
javax.ws.rs.core.MediaType mediaType,
javax.xml.bind.Unmarshaller u,
java.io.InputStream entityStream) |
javax.xml.bind.JAXBElement<?> |
readFrom(java.lang.Class<javax.xml.bind.JAXBElement<?>> 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 |
writeTo(javax.xml.bind.JAXBElement<?> 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) |
protected abstract void |
writeTo(javax.xml.bind.JAXBElement<?> t,
javax.ws.rs.core.MediaType mediaType,
java.nio.charset.Charset c,
javax.xml.bind.Marshaller m,
java.io.OutputStream entityStream) |
getJAXBContext, getMarshaller, getSAXSource, getStoredJAXBContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeadergetCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsStringpublic AbstractJAXBElementProvider(javax.ws.rs.ext.Providers ps)
public AbstractJAXBElementProvider(javax.ws.rs.ext.Providers ps,
javax.ws.rs.core.MediaType mt)
public boolean isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
public boolean isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
public final javax.xml.bind.JAXBElement<?> readFrom(java.lang.Class<javax.xml.bind.JAXBElement<?>> 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
java.io.IOExceptionprotected abstract javax.xml.bind.JAXBElement<?> readFrom(java.lang.Class<?> type,
javax.ws.rs.core.MediaType mediaType,
javax.xml.bind.Unmarshaller u,
java.io.InputStream entityStream)
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic final void writeTo(javax.xml.bind.JAXBElement<?> 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
java.io.IOExceptionprotected abstract void writeTo(javax.xml.bind.JAXBElement<?> t,
javax.ws.rs.core.MediaType mediaType,
java.nio.charset.Charset c,
javax.xml.bind.Marshaller m,
java.io.OutputStream entityStream)
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionCopyright © 2016 Oracle Corporation. All Rights Reserved.