X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2Fquelaton%2FClientPutCommand.java;h=7e900f281a50290af99f82dc55baf794d7ffcc51;hb=ebede056b159ea34d294f3fac0e2def790454a48;hp=231af10df2f5741675b1342374fd963cae2d9573;hpb=d05d526e4db3c92e6795c3e25648e159ae9a1473;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 231af10..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(String uri); - 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); + + } }