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 ClassLoader
classLoader
protected JAXBContext
jaxbContext
static 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 void
buildMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
protected void
configureMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
void
dispose()
ClassLoader
getClassLoader()
MarshallingFormat
getFormat()
protected Marshaller
getMarshaller()
protected Unmarshaller
getUnmarshaller()
String
marshall(Object input)
void
setClassLoader(ClassLoader classLoader)
<T> T
unmarshall(String input, Class<T> type)
protected Object
unwrap(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:
marshall
in interfaceMarshaller
-
unmarshall
public <T> T unmarshall(String input, Class<T> type)
- Specified by:
unmarshall
in interfaceMarshaller
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceMarshaller
-
getFormat
public MarshallingFormat getFormat()
- Specified by:
getFormat
in 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:
setClassLoader
in interfaceMarshaller
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceMarshaller
-
-