01: /*
02: * GNetWatch
03: * Copyright 2006, 2007 Alexandre Fenyo
04: * gnetwatch@fenyo.net
05: *
06: * This file is part of GNetWatch.
07: *
08: * GNetWatch is free software; you can redistribute it and/or modify
09: * it under the terms of the GNU General Public License as published by
10: * the Free Software Foundation; either version 2 of the License, or
11: * (at your option) any later version.
12: *
13: * GNetWatch is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public License
19: * along with GNetWatch; if not, write to the Free Software
20: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21: */
22:
23: package net.fenyo.gnetwatch.data;
24:
25: import net.fenyo.gnetwatch.*;
26: import net.fenyo.gnetwatch.targets.*;
27:
28: import java.util.*;
29:
30: import org.apache.commons.logging.Log;
31: import org.apache.commons.logging.LogFactory;
32:
33: /**
34: * Events of type EventsBytesSent store the amount of data sent
35: * during the period between the last event and this one.
36: * @author Alexandre Fenyo
37: * @version $Id: EventBytesSent.java,v 1.5 2007/03/03 00:38:20 fenyo Exp $
38: */
39:
40: public class EventBytesSent extends EventBytesExchanged {
41: private static Log log = LogFactory.getLog(EventBytesSent.class);
42:
43: /**
44: * Constructor.
45: * @param bytes_sent bytes sent during the period between the last event and this one.
46: */
47: // Queue thread
48: public EventBytesSent(final long bytes_sent) {
49: super (bytes_sent);
50: }
51:
52: /**
53: * Returns the numeric value stored with this event.
54: * @param none.
55: * @return long numeric value.
56: */
57: // Queue & AWT thread
58: public long getBytesSent() {
59: return getBytesExchanged();
60: }
61: }
|