Class JaxbMarshaller
- java.lang.Object
-
- org.kie.server.api.marshalling.jaxb.JaxbMarshaller
-
- All Implemented Interfaces:
Marshaller
public class JaxbMarshaller extends Object implements Marshaller
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassLoaderclassLoaderprotected JAXBContextjaxbContextstatic Class<?>[]KIE_SERVER_JAXB_CLASSES-
Fields inherited from interface org.kie.server.api.marshalling.Marshaller
MARSHALLER_PARAMETER_STRICT
-
-
Constructor Summary
Constructors Constructor Description JaxbMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildMarshaller(Set<Class<?>> classes, ClassLoader classLoader)protected voidconfigureMarshaller(Set<Class<?>> classes, ClassLoader classLoader)voiddispose()ClassLoadergetClassLoader()MarshallingFormatgetFormat()protected MarshallergetMarshaller()protected UnmarshallergetUnmarshaller()Stringmarshall(Object input)voidsetClassLoader(ClassLoader classLoader)<T> Tunmarshall(String input, Class<T> type)protected Objectunwrap(Object data)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kie.server.api.marshalling.Marshaller
marshall, marshallAsBytes, unmarshall, unmarshall
-
-
-
-
Field Detail
-
KIE_SERVER_JAXB_CLASSES
public static final Class<?>[] KIE_SERVER_JAXB_CLASSES
-
jaxbContext
protected JAXBContext jaxbContext
-
classLoader
protected ClassLoader classLoader
-
-
Constructor Detail
-
JaxbMarshaller
public JaxbMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
-
-
Method Detail
-
buildMarshaller
protected void buildMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
-
configureMarshaller
protected void configureMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
-
marshall
public String marshall(Object input)
- Specified by:
marshallin interfaceMarshaller
-
unmarshall
public <T> T unmarshall(String input, Class<T> type)
- Specified by:
unmarshallin interfaceMarshaller
-
dispose
public void dispose()
- Specified by:
disposein interfaceMarshaller
-
getFormat
public MarshallingFormat getFormat()
- Specified by:
getFormatin interfaceMarshaller
-
getMarshaller
protected Marshaller getMarshaller() throws JAXBException
- Throws:
JAXBException
-
getUnmarshaller
protected Unmarshaller getUnmarshaller() throws JAXBException
- Throws:
JAXBException
-
setClassLoader
public void setClassLoader(ClassLoader classLoader)
- Specified by:
setClassLoaderin interfaceMarshaller
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceMarshaller
-
-