@Provider
@Produces(value={"application/xml","application/*+xml","text/xml","text/*+xml"})
@Consumes(value={"application/xml","application/*+xml","text/xml","text/*+xml"})
public class JAXBElementProvider
extends AbstractJAXBProvider<JAXBElement<?>>
A JAXB Provider which handles parameter and return types of JAXBElement. This provider will be
selected when the resource is declared as:
@POST
@Consumes("applictaion/xml")
@Produces("applictaion/xml")
public JAXBElement<Contact> getContact(JAXBElement<Contact> value);
providers| Constructor and Description |
|---|
JAXBElementProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isReadWritable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
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 outputStream) |
decorateMarshaller, decorateUnmarshaller, findJAXBContext, getCharset, getMarshaller, isDisableDTDs, isDisableExternalEntities, isEnableSecureProcessingFeature, isReadable, isWriteable, needsSecurity, processWithSecureProcessing, setCharset, setDisableDTDs, setDisableExternalEntities, setEnableSecureProcessingFeaturegetSizeprotected boolean isReadWritable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadWritable in class AbstractJAXBProvider<JAXBElement<?>>public 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
readFrom in interface javax.ws.rs.ext.MessageBodyReader<JAXBElement<?>>readFrom in class AbstractJAXBProvider<JAXBElement<?>>IOExceptionpublic 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 outputStream) throws IOException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<JAXBElement<?>>writeTo in class AbstractJAXBProvider<JAXBElement<?>>IOExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.