class ObjectLoader extends BackgroundTask {

    /**
     * This is the object that will forward the updates to the observers.
     */
    protected Observable observable;
    /**
     * iText's PdfReader object.
     */
    protected PdfReader reader;
    /**
     * The factory that can provide PDF objects.
     */
    protected IndirectObjectFactory objects;
    /**
     * The factory that can provide tree nodes.
     */
    protected TreeNodeFactory nodes;

    /**
     * Creates a new ObjectLoader.
     *
     * @param observable the object that will forward the changes.
     * @param reader     the PdfReader from which the objects will be read.
     */
    public ObjectLoader(Observable observable, PdfReader reader) {
        this.observable = observable;
        this.reader = reader;
        start();
    }

    /**
     * Getter for the PdfReader object.
     *
     * @return a reader object
     */
    public PdfReader getReader() {
        return reader;
    }

    /**
     * Getter for the object factory.
     *
     * @return an indirect object factory
     */
    public IndirectObjectFactory getObjects() {
        return objects;
    }

    /**
     * Getter for the tree node factory.
     *
     * @return a tree node factory
     */
    public TreeNodeFactory getNodes() {
        return nodes;
    }

    /**
     * @see com.lowagie.rups.model.BackgroundTask#doTask()
     */
    @Override
    public void doTask() {<FILL_FUNCTION_BODY>}
}

        ProgressDialog progress = new ProgressDialog(null, "Reading PDF file");
        objects = new IndirectObjectFactory(reader);
        int n = objects.getXRefMaximum();
        progress.setMessage("Reading the Cross-Reference table");
        progress.setTotal(n);
        while (objects.storeNextObject()) {
            progress.setValue(objects.getCurrent());
        }
        progress.setTotal(0);
        nodes = new TreeNodeFactory(objects);
        progress.setMessage("Updating GUI");
        observable.notifyObservers(this);
        progress.dispose();
    
<methods>public void <init>() ,public abstract void doTask() ,public void finished() ,public void interrupt() ,public void start() <variables>private com.lowagie.rups.model.BackgroundTask.ThreadWrapper thread