Package com.peterphi.std.util.jaxb
Class JAXBSerialiserFactory
java.lang.Object
com.peterphi.std.util.jaxb.JAXBSerialiserFactory
A factory for JAXBSerialiser instances that can optionally be forced to use EclipseLink MOXy (or use the default JAXBContext
implementation acquisition rules).
Caches JAXBSerialiser instances created using either
Caches JAXBSerialiser instances created using either
SoftReference
s or direct hard references (based on config - defaults to soft references)-
Constructor Summary
ConstructorDescriptionJAXBSerialiserFactory
(boolean useMoxy) JAXBSerialiserFactory
(boolean useMoxy, boolean useSoftReferences) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Remove all items from the cachegetInstance
(Class<?> clazz) getInstance
(String contextPath) protected JAXBSerialiser
getInstance
(String key, Supplier<JAXBSerialiser> provider)
-
Constructor Details
-
JAXBSerialiserFactory
public JAXBSerialiserFactory(boolean useMoxy) -
JAXBSerialiserFactory
public JAXBSerialiserFactory(boolean useMoxy, boolean useSoftReferences)
-
-
Method Details
-
getInstance
-
clear
public void clear()Remove all items from the cache -
getInstance
-
getInstance
-