package ru.nbch.credit_tracker.service.xml.stax;

import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.util.function.Consumer;
import java.util.function.Function;

public interface StaxReader<T> {
    Class<T> type();
    T read(XMLStreamReader xmlStreamReader) throws XMLStreamException;
    T read(XMLStreamReader reader, Consumer<T> objProcessor, Function<T, Boolean> emptyBatchCheckFunction, Integer batchSize, String endBatchElementPath) throws XMLStreamException;
}
