KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > matuschek > http > HttpToolCallback


1 package net.matuschek.http;
2
3 /*********************************************
4     Copyright (c) 2001 by Daniel Matuschek
5 *********************************************/

6
7 /**
8  * Callback interface to inform a frontend about the state of the
9  * current HttpTool download operation
10  *
11  * @author Daniel Matuschek
12  * @version $Id $
13  */

14 public interface HttpToolCallback {
15
16   /**
17    * After initiating a download, this method will be called to
18    * inform about the URL that will be retrieved
19    * @param URL url that will be retrieved now
20    */

21   void setHttpToolDocUrl(String JavaDoc url);
22   
23   /**
24    * After HttpTool got a Content-Length header
25    * this method will be called to inform about the size of
26    * the document to retrieve
27    * @param size document size in
28    */

29   void setHttpToolDocSize(int size);
30   
31
32   /**
33    * after a block of bytes was read (default after every 1024 bytes,
34    * this method will be called
35    * @param size the number of bytes that where retrieved
36    */

37   void setHttpToolDocCurrentSize(int size);
38
39
40   /**
41    * informs about the current status of the HttpTool
42    * @param status an integer describing the current status
43    * constants defined in HttpTool
44    * @see HttpTool
45    */

46   void setHttpToolStatus(int status);
47 }
48
Popular Tags