public class JaxbStringReaderProvider
extends java.lang.Object
param converter provider
that
support conversion of a string value into a JAXB instance.Modifier and Type | Class and Description |
---|---|
static class |
JaxbStringReaderProvider.RootElementProvider
Root element JAXB
param converter . |
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.Class,javax.xml.bind.JAXBContext> |
jaxbContexts |
private Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext>> |
mtContext |
private Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.Unmarshaller>> |
mtUnmarshaller |
Constructor and Description |
---|
JaxbStringReaderProvider(javax.ws.rs.ext.Providers ps)
Create JAXB string reader provider.
|
Modifier and Type | Method and Description |
---|---|
private javax.xml.bind.JAXBContext |
getJAXBContext(java.lang.Class type) |
protected javax.xml.bind.JAXBContext |
getStoredJAXBContext(java.lang.Class type)
Get the stored JAXB context supporting the Java type.
|
protected javax.xml.bind.Unmarshaller |
getUnmarshaller(java.lang.Class type)
Get JAXB unmarshaller for the type.
|
private static final java.util.Map<java.lang.Class,javax.xml.bind.JAXBContext> jaxbContexts
private final Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext>> mtContext
private final Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.Unmarshaller>> mtUnmarshaller
public JaxbStringReaderProvider(javax.ws.rs.ext.Providers ps)
ps
- used to obtain JAXBContext
and Unmarshaller
ContextResolvers
protected final javax.xml.bind.Unmarshaller getUnmarshaller(java.lang.Class type) throws javax.xml.bind.JAXBException
type
- Java type to be unmarshalled.javax.xml.bind.JAXBException
- in case there's an error retrieving the unmarshaller.private javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class type) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
protected javax.xml.bind.JAXBContext getStoredJAXBContext(java.lang.Class type) throws javax.xml.bind.JAXBException
type
- Java type supported by the stored JAXB context.javax.xml.bind.JAXBException
- in case JAXB context retrieval fails.