public final class JaxbContextRepository extends Object
| Constructor and Description |
|---|
JaxbContextRepository(Class<?>... classes) |
| Modifier and Type | Method and Description |
|---|---|
com.sun.xml.bind.api.JAXBRIContext |
getJaxbContext(com.sun.xml.ws.api.addressing.AddressingVersion av)
Returns JAXB context that is intitialized based on a given addressing version.
|
Unmarshaller |
getUnmarshaller(com.sun.xml.ws.api.addressing.AddressingVersion av)
Creates JAXB
Unmarshaller that is able to unmarshall elements for specified classes. |
public JaxbContextRepository(Class<?>... classes) throws RxRuntimeException
RxRuntimeExceptionpublic Unmarshaller getUnmarshaller(com.sun.xml.ws.api.addressing.AddressingVersion av) throws RxRuntimeException
Unmarshaller that is able to unmarshall elements for specified classes.
As JAXB unmarshallers are not thread-safe, this method should be used to create a new Unmarshaller
instance whenever there is a chance that the same instance might be invoked concurrently from multiple
threads. On th other hand, it is prudent to cache or pool Unmarshaller instances if possible as
constructing a new Unmarshaller instance is rather expensive.
For additional information see this blog entry.RxRuntimeException - in case the creation of unmarshaller failedpublic com.sun.xml.bind.api.JAXBRIContext getJaxbContext(com.sun.xml.ws.api.addressing.AddressingVersion av)
av - addressing version used to initialize JAXB contextCopyright © 2005–2018 Oracle Corporation. All rights reserved.