Use execute() to trigger execution of commands
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / quelaton / ClientGetCommand.java
1 package net.pterodactylus.fcp.quelaton;
2
3 import java.io.InputStream;
4 import java.util.Optional;
5
6 import net.pterodactylus.fcp.Priority;
7
8 import com.google.common.util.concurrent.ListenableFuture;
9
10 /**
11  * Command that retrieves data from Freenet.
12  *
13  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
14  */
15 public interface ClientGetCommand {
16
17         ClientGetCommand ignoreDataStore();
18         ClientGetCommand dataStoreOnly();
19         ClientGetCommand maxSize(long maxSize);
20         ClientGetCommand priority(Priority priority);
21         ClientGetCommand realTime();
22         ClientGetCommand global();
23
24         Executable<Optional<Data>> uri(String uri);
25
26         interface Data {
27
28                 String getMimeType();
29                 long size();
30                 InputStream getInputStream();
31
32         }
33
34 }