/*
 * @(#)BsdBytesReceivedEvent.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.bsd;

import java.util.EventObject;


/**
 * Fired from <code>InputReader</code> and <code>OutputWriter</code>  when data
 * is received from remote host.
 */
public class BsdBytesReceivedEvent
        extends EventObject {
    private long total;
    private int bytes;

    /**
     * Creates BsdBytesReceivedEvent.
     *
     * @param source the source of the event
     * @param total  Total number of bytes received since the connection was
     *               established
     * @param bytes  Number of bytes received during last read.
     */
    public BsdBytesReceivedEvent(Object source, long total, int bytes) {
        super(source);
        this.total = total;
        this.bytes = bytes;
    }

    /**
     * Gets Total number of bytes received since the connection was established.
     *
     * @return total
     */
    public long getTotal() {
        return total;
    }

    /**
     * Gets number of bytes received during last read.
     *
     * @return bytes
     */
    public long getBytes() {
        return bytes;
    }
}
