01: package net.matuschek.http;
02:
03: /*********************************************
04: Copyright (c) 2001 by Daniel Matuschek
05: *********************************************/
06:
07: /**
08: * Callback interface to inform a frontend about the state of the
09: * 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 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: * after a block of bytes was read (default after every 1024 bytes,
33: * this method will be called
34: * @param size the number of bytes that where retrieved
35: */
36: void setHttpToolDocCurrentSize(int size);
37:
38: /**
39: * informs about the current status of the HttpTool
40: * @param status an integer describing the current status
41: * constants defined in HttpTool
42: * @see HttpTool
43: */
44: void setHttpToolStatus(int status);
45: }
|