View Javadoc

1   /*
2    *  XNap - A P2P framework and client.
3    *
4    *  See the file AUTHORS for copyright information.
5    *
6    *  This program is free software; you can redistribute it and/or modify
7    *  it under the terms of the GNU General Public License as published by
8    *  the Free Software Foundation.
9    *
10   *  This program is distributed in the hope that it will be useful,
11   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   *  GNU General Public License for more details.
14   *
15   *  You should have received a copy of the GNU General Public License
16   *  along with this program; if not, write to the Free Software
17   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   */
19  
20  package org.xnap.plugin.gift.net.event;
21  
22  /***
23   * StatsEvent  Wrapps giFT-protocol statistics
24   *
25   * @author <a href="mailto:tvanlessen@taval.de">Tammo van Lessen</a>
26   * @version CVS $Id: StatsEvent.java,v 1.1 2003/10/05 00:20:32 squig Exp $
27   */
28  public class StatsEvent extends Event {
29      //~ Instance fields --------------------------------------------------------
30  
31      private String protocol;
32      private float size;
33      private long files;
34      private long users;
35  
36      //~ Constructors -----------------------------------------------------------
37  
38      /***
39       * Constructor for StatsEvent.
40       *
41       * @param protocol
42       */
43      public StatsEvent(String protocol) {
44          super();
45          this.protocol = protocol;
46      }
47  
48      //~ Methods ----------------------------------------------------------------
49  
50      /***
51       * Sets the files.
52       *
53       * @param files The files to set
54       */
55      public void setFiles(long files) {
56          this.files = files;
57      }
58  
59      /***
60       * Returns the files.
61       *
62       * @return long
63       */
64      public long getFiles() {
65          return files;
66      }
67  
68      /***
69       * Returns the protocol.
70       *
71       * @return String
72       */
73      public String getProtocol() {
74          return protocol;
75      }
76  
77      /***
78       * Sets the size.
79       *
80       * @param size The size to set
81       */
82      public void setSize(float size) {
83          this.size = size;
84      }
85  
86      /***
87       * Returns the size.
88       *
89       * @return long
90       */
91      public float getSize() {
92          return size;
93      }
94  
95      /***
96       * Sets the users.
97       *
98       * @param users The users to set
99       */
100     public void setUsers(long users) {
101         this.users = users;
102     }
103 
104     /***
105      * Returns the users.
106      *
107      * @return long
108      */
109     public long getUsers() {
110         return users;
111     }
112 }