public abstract class AbstractJAXBElementProvider extends AbstractJAXBProvider<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(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected abstract JAXBElement<?> |
readFrom(Class<?> type,
javax.ws.rs.core.MediaType mediaType,
Unmarshaller u,
InputStream entityStream) |
JAXBElement<?> |
readFrom(Class<JAXBElement<?>> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(JAXBElement<?> t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
protected abstract void |
writeTo(JAXBElement<?> t,
javax.ws.rs.core.MediaType mediaType,
Charset c,
Marshaller m,
OutputStream entityStream) |
getMarshaller, getSAXSource, getStoredJAXBContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeader
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
public AbstractJAXBElementProvider(javax.ws.rs.ext.Providers ps)
public AbstractJAXBElementProvider(javax.ws.rs.ext.Providers ps, javax.ws.rs.core.MediaType mt)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public final JAXBElement<?> readFrom(Class<JAXBElement<?>> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
IOException
protected abstract JAXBElement<?> readFrom(Class<?> type, javax.ws.rs.core.MediaType mediaType, Unmarshaller u, InputStream entityStream) throws JAXBException
JAXBException
public final void writeTo(JAXBElement<?> 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
IOException
protected abstract void writeTo(JAXBElement<?> t, javax.ws.rs.core.MediaType mediaType, Charset c, Marshaller m, OutputStream entityStream) throws JAXBException
JAXBException
Copyright © 2013 Oracle Corporation. All rights reserved.