4121 |
22 Sep 16 |
nicklas |
1 |
package net.sf.basedb.opengrid.filetransfer; |
4121 |
22 Sep 16 |
nicklas |
2 |
|
4121 |
22 Sep 16 |
nicklas |
3 |
import java.io.IOException; |
4121 |
22 Sep 16 |
nicklas |
4 |
import java.io.InputStream; |
4121 |
22 Sep 16 |
nicklas |
5 |
|
4121 |
22 Sep 16 |
nicklas |
6 |
/** |
4121 |
22 Sep 16 |
nicklas |
Represents a local file or resource that can be uploaded |
4121 |
22 Sep 16 |
nicklas |
as a file to a remote server. |
4121 |
22 Sep 16 |
nicklas |
9 |
|
4121 |
22 Sep 16 |
nicklas |
@author nicklas |
4121 |
22 Sep 16 |
nicklas |
@since 1.0 |
4121 |
22 Sep 16 |
nicklas |
12 |
*/ |
4121 |
22 Sep 16 |
nicklas |
13 |
public interface UploadSource |
4121 |
22 Sep 16 |
nicklas |
14 |
{ |
4121 |
22 Sep 16 |
nicklas |
15 |
|
4121 |
22 Sep 16 |
nicklas |
16 |
/** |
4121 |
22 Sep 16 |
nicklas |
The name of the resource. |
4121 |
22 Sep 16 |
nicklas |
18 |
*/ |
4121 |
22 Sep 16 |
nicklas |
19 |
public String getName(); |
4121 |
22 Sep 16 |
nicklas |
20 |
|
4121 |
22 Sep 16 |
nicklas |
21 |
/** |
4124 |
23 Sep 16 |
nicklas |
Get a metadata instance with information about |
4124 |
23 Sep 16 |
nicklas |
the local file that is about to be uploaded. This method |
4124 |
23 Sep 16 |
nicklas |
is called before the {@link #getInputStream()} is called. |
4124 |
23 Sep 16 |
nicklas |
25 |
|
4124 |
23 Sep 16 |
nicklas |
@return A metadata instance or null if no metadata is known |
4121 |
22 Sep 16 |
nicklas |
27 |
*/ |
4124 |
23 Sep 16 |
nicklas |
28 |
public FileMetaData getMetadata(); |
4124 |
23 Sep 16 |
nicklas |
29 |
|
4121 |
22 Sep 16 |
nicklas |
30 |
/** |
4121 |
22 Sep 16 |
nicklas |
Get an input stream for reading the resource data. |
4121 |
22 Sep 16 |
nicklas |
32 |
*/ |
4121 |
22 Sep 16 |
nicklas |
33 |
public InputStream getInputStream() |
4121 |
22 Sep 16 |
nicklas |
34 |
throws IOException; |
4121 |
22 Sep 16 |
nicklas |
35 |
} |