@Provider @Produces(value={"application/*+xml","text/*+xml"}) @Consumes(value={"application/*+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)
FIXME Comment this
|
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, setEnableSecureProcessingFeature
getSize
protected boolean isReadWritable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
AbstractJAXBProvider
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<?>>
IOException
public 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<?>>
IOException
Copyright © 2015 JBoss by Red Hat. All rights reserved.