package be.iminds.ilabt.jfed.groovy_dsl;

import be.iminds.ilabt.jfed.groovy_dsl.events.DSLEvent;

import javax.xml.stream.XMLStreamException;

/**
 * User: twalcari
 * Date: 5/18/2015
 * Time: 09:09
 */
public interface DSLEventWriter {



    void add(DSLEvent event) throws DSLStreamException;

    /**
     * Writes any cached events to the underlying output mechanism
     * @throws XMLStreamException
     */
    void flush() throws XMLStreamException;

    /**
     * Frees any resources associated with this stream
     * @throws XMLStreamException
     */
    void close() throws XMLStreamException;

}
