Class MarshallerObjectCache


  • public class MarshallerObjectCache
    extends java.lang.Object
    Cache the Marshaller Object as its initialization takes about 40ms
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.xml.bind.Marshaller getMarshaller​(java.lang.Class<?> c)
      Cache of the marshaller object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MarshallerObjectCache

        public MarshallerObjectCache()
        Empty constructor
    • Method Detail

      • getMarshaller

        public javax.xml.bind.Marshaller getMarshaller​(java.lang.Class<?> c)
                                                throws javax.xml.bind.JAXBException
        Cache of the marshaller object
        Parameters:
        c - : class whom we want the JAXB Marshaller
        Returns:
        The JAXB Marshaller for the class given in argument
        Throws:
        javax.xml.bind.JAXBException - if exception when creating new instance JAXBContext