Class JaxbStringReaderProvider
- java.lang.Object
-
- org.glassfish.jersey.jaxb.internal.JaxbStringReaderProvider
-
- Direct Known Subclasses:
JaxbStringReaderProvider.RootElementProvider
public class JaxbStringReaderProvider extends java.lang.ObjectString reader provider producingparam converter providerthat support conversion of a string value into a JAXB instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJaxbStringReaderProvider.RootElementProviderRoot element JAXBparam converter.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Class,javax.xml.bind.JAXBContext>jaxbContextsprivate Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext>>mtContextprivate Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.Unmarshaller>>mtUnmarshaller
-
Constructor Summary
Constructors Constructor Description JaxbStringReaderProvider(javax.ws.rs.ext.Providers ps)Create JAXB string reader provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private javax.xml.bind.JAXBContextgetJAXBContext(java.lang.Class type)protected javax.xml.bind.JAXBContextgetStoredJAXBContext(java.lang.Class type)Get the stored JAXB context supporting the Java type.protected javax.xml.bind.UnmarshallergetUnmarshaller(java.lang.Class type)Get JAXB unmarshaller for the type.
-
-
-
Field Detail
-
jaxbContexts
private static final java.util.Map<java.lang.Class,javax.xml.bind.JAXBContext> jaxbContexts
-
mtContext
private final Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext>> mtContext
-
mtUnmarshaller
private final Value<javax.ws.rs.ext.ContextResolver<javax.xml.bind.Unmarshaller>> mtUnmarshaller
-
-
Method Detail
-
getUnmarshaller
protected final javax.xml.bind.Unmarshaller getUnmarshaller(java.lang.Class type) throws javax.xml.bind.JAXBExceptionGet JAXB unmarshaller for the type.- Parameters:
type- Java type to be unmarshalled.- Returns:
- JAXB unmarshaller for the given type.
- Throws:
javax.xml.bind.JAXBException- in case there's an error retrieving the unmarshaller.
-
getJAXBContext
private javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class type) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
getStoredJAXBContext
protected javax.xml.bind.JAXBContext getStoredJAXBContext(java.lang.Class type) throws javax.xml.bind.JAXBExceptionGet the stored JAXB context supporting the Java type.- Parameters:
type- Java type supported by the stored JAXB context.- Returns:
- stored JAXB context supporting the Java type.
- Throws:
javax.xml.bind.JAXBException- in case JAXB context retrieval fails.
-
-