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