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  import java.util.Vector;
23  
24  
25  /***
26   * DownloadUpdatedEvent
27   *
28   * @author <a href="mailto:taval@users.sf.net">Tammo van Lessen</a>
29   * @version CVS $Id: UploadUpdatedEvent.java,v 1.1 2003/10/05 00:20:32 squig Exp $
30   */
31  public class UploadUpdatedEvent extends Event {
32      //~ Instance fields --------------------------------------------------------
33  
34      private String filename;
35      private String hash;
36      private Vector sources;
37      private String state;
38      private long elapsed;
39      private long size;
40      private long throughput;
41      private long transmit;
42  
43      //~ Constructors -----------------------------------------------------------
44  
45      /***
46       * Constructor for DownloadUpdatedEvent.
47       *
48       * @param dc DOCUMENT ME!
49       */
50      public UploadUpdatedEvent() {
51          super();
52          sources = new Vector();
53      }
54  
55      //~ Methods ----------------------------------------------------------------
56  
57  
58      /***
59       * Sets the elapsed.
60       *
61       * @param elapsed The elapsed to set
62       */
63      public void setElapsed(long elapsed) {
64          this.elapsed = elapsed;
65      }
66  
67      /***
68       * Returns the elapsed.
69       *
70       * @return long
71       */
72      public long getElapsed() {
73          return elapsed;
74      }
75  
76      /***
77       * Sets the filename.
78       *
79       * @param filename The filename to set
80       */
81      public void setFilename(String filename) {
82          this.filename = filename;
83      }
84  
85      /***
86       * Returns the filename.
87       *
88       * @return String
89       */
90      public String getFilename() {
91          return filename;
92      }
93  
94      /***
95       * Sets the hash.
96       *
97       * @param hash The hash to set
98       */
99      public void setHash(String hash) {
100         this.hash = hash;
101     }
102 
103     /***
104      * Returns the hash.
105      *
106      * @return String
107      */
108     public String getHash() {
109         return hash;
110     }
111 
112     /***
113      * Sets the size.
114      *
115      * @param size The size to set
116      */
117     public void setSize(long size) {
118         this.size = size;
119     }
120 
121     /***
122      * Returns the size.
123      *
124      * @return long
125      */
126     public long getSize() {
127         return size;
128     }
129 
130     /***
131      * Sets the state.
132      *
133      * @param state The state to set
134      */
135     public void setState(String state) {
136         this.state = state;
137     }
138 
139     /***
140      * Returns the state.
141      *
142      * @return int
143      */
144     public String getState() {
145         return state;
146     }
147 
148     /***
149      * Sets the throughput.
150      *
151      * @param throughput The throughput to set
152      */
153     public void setThroughput(long throughput) {
154         this.throughput = throughput;
155     }
156 
157     /***
158      * Returns the throughput.
159      *
160      * @return long
161      */
162     public long getThroughput() {
163         return throughput;
164     }
165 
166     /***
167      * Sets the transmit.
168      *
169      * @param transmit The transmit to set
170      */
171     public void setTransmit(long transmit) {
172         this.transmit = transmit;
173     }
174 
175     /***
176      * Returns the transmit.
177      *
178      * @return long
179      */
180     public long getTransmit() {
181         return transmit;
182     }
183 	/*CHGDOWNLOAD(2)
184 	SOURCE
185 	{
186 	start(0)
187 	status(Active)
188 	total(2425179)
189 	transmit(41160)
190 	url(OpenFT://62.108.30.159:2672/.share/cds/cecilia_bartoli/se_tu_mami_-_arie_antiche/04_a._scarlatti__o_cessate_di_piagarmi.mp3)
191 	user(spif@62.108.30.159)}
192 
193 	elapsed(951)
194 	file(04_a._scarlatti__o_cessate_di_piagarmi.mp3)
195 	hash(4184c229d6a629956755eca3a4f00e79)
196 	size(2425179)
197 	state(Active)
198 	throughput(2824)
199 	transmit(41160);
200 	*/
201 
202 }