KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > fenyo > gnetwatch > data > EventBytesReceived


1
2 /*
3  * GNetWatch
4  * Copyright 2006, 2007 Alexandre Fenyo
5  * gnetwatch@fenyo.net
6  *
7  * This file is part of GNetWatch.
8  *
9  * GNetWatch is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * GNetWatch is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with GNetWatch; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22  */

23
24 package net.fenyo.gnetwatch.data;
25
26 import net.fenyo.gnetwatch.*;
27 import net.fenyo.gnetwatch.targets.*;
28
29 import java.util.*;
30
31 import org.apache.commons.logging.Log;
32 import org.apache.commons.logging.LogFactory;
33
34 /**
35  * Events of type EventsBytesReceived store the amount of data received
36  * during the period between the last event and this one.
37  * @author Alexandre Fenyo
38  * @version $Id: EventBytesReceived.java,v 1.5 2007/03/03 00:38:20 fenyo Exp $
39  */

40
41 public class EventBytesReceived extends EventBytesExchanged {
42   private static Log log = LogFactory.getLog(EventBytesSent.class);
43
44   /**
45    * Constructor.
46    * @param bytes_received bytes received during the period between the last event and this one.
47    */

48   // Queue thread
49
public EventBytesReceived(final long bytes_received) {
50     super(bytes_received);
51   }
52
53   /**
54    * Returns the numeric value stored with this event.
55    * @param none.
56    * @return long numeric value.
57    */

58   // Queue & AWT thread
59
public long getBytesReceived() {
60     return getBytesReceived();
61   }
62 }
63
Popular Tags