Class XstreamRecordMarshaller<P>

  • Type Parameters:
    P - type of the record's payload
    All Implemented Interfaces:
    org.jeasy.batch.core.marshaller.RecordMarshaller<P,​java.lang.String>, org.jeasy.batch.core.processor.RecordProcessor<P,​java.lang.String>

    public class XstreamRecordMarshaller<P>
    extends java.lang.Object
    implements org.jeasy.batch.core.marshaller.RecordMarshaller<P,​java.lang.String>
    Marshals an object to XML using XStream.
    Author:
    Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
    • Constructor Detail

      • XstreamRecordMarshaller

        public XstreamRecordMarshaller​(java.lang.String elementName,
                                       java.lang.Class<?> type)
        Parameters:
        elementName - the alias of the object in the corresponding xml tag
        type - the type of the object to marshal
      • XstreamRecordMarshaller

        public XstreamRecordMarshaller​(com.thoughtworks.xstream.XStream xStream)
        Parameters:
        xStream - a pre-configured xstream instance
    • Method Detail

      • processRecord

        public org.jeasy.batch.xml.XmlRecord processRecord​(org.jeasy.batch.core.record.Record<P> record)
        Specified by:
        processRecord in interface org.jeasy.batch.core.processor.RecordProcessor<P,​java.lang.String>