Class JaxbStringReaderProvider
java.lang.Object
org.glassfish.jersey.jaxb.internal.JaxbStringReaderProvider
- Direct Known Subclasses:
JaxbStringReaderProvider.RootElementProvider
String reader provider producing
param converter provider
that
support conversion of a string value into a JAXB instance.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Root element JAXBparam converter
. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<Class,
JAXBContext> private final Value<javax.ws.rs.ext.ContextResolver<JAXBContext>>
private final Value<javax.ws.rs.ext.ContextResolver<Unmarshaller>>
-
Constructor Summary
ConstructorsConstructorDescriptionJaxbStringReaderProvider
(javax.ws.rs.ext.Providers ps) Create JAXB string reader provider. -
Method Summary
Modifier and TypeMethodDescriptionprivate JAXBContext
getJAXBContext
(Class type) protected JAXBContext
getStoredJAXBContext
(Class type) Get the stored JAXB context supporting the Java type.protected final Unmarshaller
getUnmarshaller
(Class type) Get JAXB unmarshaller for the type.
-
Field Details
-
jaxbContexts
-
mtContext
-
mtUnmarshaller
-
-
Constructor Details
-
JaxbStringReaderProvider
public JaxbStringReaderProvider(javax.ws.rs.ext.Providers ps) Create JAXB string reader provider.- Parameters:
ps
- used to obtainJAXBContext
andUnmarshaller
ContextResolvers
-
-
Method Details
-
getUnmarshaller
Get JAXB unmarshaller for the type.- Parameters:
type
- Java type to be unmarshalled.- Returns:
- JAXB unmarshaller for the given type.
- Throws:
JAXBException
- in case there's an error retrieving the unmarshaller.
-
getJAXBContext
- Throws:
JAXBException
-
getStoredJAXBContext
Get 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:
JAXBException
- in case JAXB context retrieval fails.
-