org.glassfish.jersey.server.internal.inject
Class JaxbStringReaderProvider

java.lang.Object
  extended by org.glassfish.jersey.server.internal.inject.JaxbStringReaderProvider
Direct Known Subclasses:
JaxbStringReaderProvider.RootElementProvider

public class JaxbStringReaderProvider
extends Object

String reader provider producing param converter provider that support conversion of a string value into a JAXB instance.

Author:
Paul Sandoz, Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
static class JaxbStringReaderProvider.RootElementProvider
          Root element JAXB param converter.
 
Constructor Summary
JaxbStringReaderProvider(Providers ps)
          Create JAXB string reader provider.
 
Method Summary
protected  JAXBContext getStoredJAXBContext(Class type)
          Get the stored JAXB context supporting the Java type.
protected  Unmarshaller getUnmarshaller(Class type)
          Get JAXB unmarshaller for the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxbStringReaderProvider

public JaxbStringReaderProvider(Providers ps)
Create JAXB string reader provider.

Parameters:
ps - used to obtain JAXBContext and Unmarshaller ContextResolvers
Method Detail

getUnmarshaller

protected final Unmarshaller getUnmarshaller(Class type)
                                      throws JAXBException
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.

getStoredJAXBContext

protected JAXBContext getStoredJAXBContext(Class type)
                                    throws JAXBException
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.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.