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(Providers ps) |
AbstractJaxbElementProvider(Providers ps,
MediaType mt) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
protected abstract JAXBElement<?> |
readFrom(Class<?> type,
MediaType mediaType,
Unmarshaller u,
InputStream entityStream) |
JAXBElement<?> |
readFrom(Class<JAXBElement<?>> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream inputStream) |
void |
writeTo(JAXBElement<?> t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
protected abstract void |
writeTo(JAXBElement<?> t,
MediaType mediaType,
Charset c,
Marshaller m,
OutputStream entityStream) |
getMarshaller, getSAXSource, getStoredJaxbContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeadergetCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsStringpublic AbstractJaxbElementProvider(Providers ps)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
public final JAXBElement<?> readFrom(Class<JAXBElement<?>> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream inputStream) throws IOException
IOExceptionprotected abstract JAXBElement<?> readFrom(Class<?> type, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws JAXBException
JAXBExceptionpublic final void writeTo(JAXBElement<?> t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
IOExceptionprotected abstract void writeTo(JAXBElement<?> t, MediaType mediaType, Charset c, Marshaller m, OutputStream entityStream) throws JAXBException
JAXBExceptionCopyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.