public boolean isStillActive() {
        if (Thread
                .currentThread()
                .isInterrupted()) {
            return false;
        }

        return currentState == STATE.NOT_YET_STARTED || currentState == STATE.ACTIVELY_CONSUMING || currentState == STATE.ASKED_TO_SHUTDOWN;
    }
Returns whether or not the consumer is still could process
a file or is still processing a file (ACTIVELY_CONSUMING or ASKED_TO_SHUTDOWN)

@return whether this consumer is still active
tika-batch/src/main/java/org/apache/tika/batch/FileResourceConsumer.java