1 |
/* |
/* |
2 |
* $Id$ |
* DTP.java |
3 |
* Copyright (C) 2003 The Free Software Foundation |
* Copyright (C) 2003 The Free Software Foundation |
4 |
* |
* |
5 |
* This file is part of GNU inetlib, a library. |
* This file is part of GNU inetlib, a library. |
46 |
* An FTP data transfer process. |
* An FTP data transfer process. |
47 |
* |
* |
48 |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
|
* @version $Revision$ $Date$ |
|
49 |
*/ |
*/ |
50 |
interface DTP |
interface DTP |
51 |
{ |
{ |
53 |
/** |
/** |
54 |
* Returns an input stream from which a remote file can be read. |
* Returns an input stream from which a remote file can be read. |
55 |
*/ |
*/ |
56 |
InputStream getInputStream () throws IOException; |
InputStream getInputStream() |
57 |
|
throws IOException; |
58 |
|
|
59 |
/** |
/** |
60 |
* Returns an output stream to which a local file can be written for |
* Returns an output stream to which a local file can be written for |
61 |
* upload. |
* upload. |
62 |
*/ |
*/ |
63 |
OutputStream getOutputStream () throws IOException; |
OutputStream getOutputStream() |
64 |
|
throws IOException; |
65 |
|
|
66 |
/** |
/** |
67 |
* Sets the transfer mode to be used with this DTP. |
* Sets the transfer mode to be used with this DTP. |
68 |
*/ |
*/ |
69 |
void setTransferMode (int mode); |
void setTransferMode(int mode); |
70 |
|
|
71 |
/** |
/** |
72 |
* Marks this DTP completed. |
* Marks this DTP completed. |
73 |
* When the current transfer has finished, any resources will be released. |
* When the current transfer has finished, any resources will be released. |
74 |
*/ |
*/ |
75 |
void complete (); |
void complete(); |
76 |
|
|
77 |
/** |
/** |
78 |
* Aborts any current transfer and releases all resources held by this |
* Aborts any current transfer and releases all resources held by this |
79 |
* DTP. |
* DTP. |
80 |
* @return true if a transfer was interrupted, false otherwise |
* @return true if a transfer was interrupted, false otherwise |
81 |
*/ |
*/ |
82 |
boolean abort (); |
boolean abort(); |
83 |
|
|
84 |
/** |
/** |
85 |
* Used to notify the DTP that its current transfer is complete. |
* Used to notify the DTP that its current transfer is complete. |
86 |
* This occurs either when end-of-stream is reached or a 226 response is |
* This occurs either when end-of-stream is reached or a 226 response is |
87 |
* received. |
* received. |
88 |
*/ |
*/ |
89 |
void transferComplete (); |
void transferComplete(); |
90 |
|
|
91 |
} |
} |
92 |
|
|