X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2Fquelaton%2FClientPutCommand.java;h=7e900f281a50290af99f82dc55baf794d7ffcc51;hb=e591c6488b692e3dfcf2efd1905d399f39c6067f;hp=bc8046fb352d078f57d8c94a5b05bd4faab431c2;hpb=1ce220842b96db2ea57e456c70977620943cb5de;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java b/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java index bc8046f..7e900f2 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java @@ -3,6 +3,7 @@ package net.pterodactylus.fcp.quelaton; import java.io.File; import java.io.InputStream; import java.util.Optional; +import java.util.function.Consumer; import net.pterodactylus.fcp.Key; @@ -13,9 +14,22 @@ import net.pterodactylus.fcp.Key; */ public interface ClientPutCommand { + ClientPutCommand onKeyGenerated(Consumer keyGenerated); ClientPutCommand named(String targetFilename); - Keyed> redirectTo(Key key); - Keyed> from(File file); - Lengthed>> from(InputStream inputStream); + WithUri redirectTo(String uri); + WithUri from(File file); + WithLength from(InputStream inputStream); + + interface WithLength { + + WithUri length(long length); + + } + + interface WithUri { + + Executable> uri(String uri); + + } }