/*
 * @(#)NntpProgressEvent.java
 *
 * Copyright (c) 2001-2002 JScape
 * 1147 S. 53rd Pl., Mesa, Arizona, 85206, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JScape. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JScape.
 */
package com.jscape.inet.nntp;

import java.util.EventObject;


/**
 * Fired while performing lengthy jobs such as retrieving groups or headers.
 * Since the NNTP protocol often does not allow clients to know in advance how
 * much data there is to retrieve, the getProgress will allways return number
 * of entries processed rather than percentual value.
 */
public class NntpProgressEvent
        extends EventObject {
    private int progress;

    /**
     * Construct a NntpProgressEvent object.
     *
     * @param source   the source of the event
     * @param progress the number of groups or headers processes
     */
    public NntpProgressEvent(Object source, int progress) {
        super(source);
        this.progress = progress;
    }

    /**
     * Gets number of groups or headers processed.
     *
     * @return number processed
     */
    public int getProgress() {
        return progress;
    }
}
