Package net.minecraft.client.realms
Class FileUpload
java.lang.Object
net.minecraft.client.realms.FileUpload
@Environment(CLIENT) public class FileUpload extends Object
- Mappings:
Namespace Name official dme
intermediary net/minecraft/class_4337
named net/minecraft/client/realms/FileUpload
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
FileUpload.CustomInputStreamEntity
-
Field Summary
Fields Modifier and Type Field Description private AtomicBoolean
cancelled
private String
clientVersion
private File
file
private static Logger
LOGGER
private org.apache.http.client.config.RequestConfig
requestConfig
private String
sessionId
private int
slotId
private UploadInfo
uploadInfo
private UploadStatus
uploadStatus
private CompletableFuture<UploadResult>
uploadTask
private String
username
private long
worldId
-
Constructor Summary
Constructors Constructor Description FileUpload(File file, long worldId, int slotId, UploadInfo uploadInfo, Session session, String clientVersion, UploadStatus uploadStatus)
-
Method Summary
Modifier and Type Method Description void
cancel()
private void
cleanup(org.apache.http.client.methods.HttpPost request, org.apache.http.impl.client.CloseableHttpClient client)
private long
getRetryDelaySeconds(org.apache.http.HttpResponse response)
private void
handleResponse(org.apache.http.HttpResponse response, UploadResult.Builder uploadResultBuilder)
boolean
isFinished()
private UploadResult
requestUpload(int currentAttempt)
private UploadResult
retryUploadAfter(long retryDelaySeconds, int currentAttempt)
private void
setupRequest(org.apache.http.client.methods.HttpPost request)
private boolean
shouldRetry(long retryDelaySeconds, int currentAttempt)
void
upload(Consumer<UploadResult> callback)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Ldme;a:Lorg/apache/logging/log4j/Logger;
intermediary field_19550
Lnet/minecraft/class_4337;field_19550:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/client/realms/FileUpload;LOGGER:Lorg/apache/logging/log4j/Logger;
-
file
- Mappings:
Namespace Name Mixin selector official b
Ldme;b:Ljava/io/File;
intermediary field_19551
Lnet/minecraft/class_4337;field_19551:Ljava/io/File;
named file
Lnet/minecraft/client/realms/FileUpload;file:Ljava/io/File;
-
worldId
private final long worldId- Mappings:
Namespace Name Mixin selector official c
Ldme;c:J
intermediary field_19552
Lnet/minecraft/class_4337;field_19552:J
named worldId
Lnet/minecraft/client/realms/FileUpload;worldId:J
-
slotId
private final int slotId- Mappings:
Namespace Name Mixin selector official d
Ldme;d:I
intermediary field_19553
Lnet/minecraft/class_4337;field_19553:I
named slotId
Lnet/minecraft/client/realms/FileUpload;slotId:I
-
uploadInfo
- Mappings:
Namespace Name Mixin selector official e
Ldme;e:Ldng;
intermediary field_19554
Lnet/minecraft/class_4337;field_19554:Lnet/minecraft/class_4888;
named uploadInfo
Lnet/minecraft/client/realms/FileUpload;uploadInfo:Lnet/minecraft/client/realms/dto/UploadInfo;
-
sessionId
- Mappings:
Namespace Name Mixin selector official f
Ldme;f:Ljava/lang/String;
intermediary field_19555
Lnet/minecraft/class_4337;field_19555:Ljava/lang/String;
named sessionId
Lnet/minecraft/client/realms/FileUpload;sessionId:Ljava/lang/String;
-
username
- Mappings:
Namespace Name Mixin selector official g
Ldme;g:Ljava/lang/String;
intermediary field_19556
Lnet/minecraft/class_4337;field_19556:Ljava/lang/String;
named username
Lnet/minecraft/client/realms/FileUpload;username:Ljava/lang/String;
-
clientVersion
- Mappings:
Namespace Name Mixin selector official h
Ldme;h:Ljava/lang/String;
intermediary field_19557
Lnet/minecraft/class_4337;field_19557:Ljava/lang/String;
named clientVersion
Lnet/minecraft/client/realms/FileUpload;clientVersion:Ljava/lang/String;
-
uploadStatus
- Mappings:
Namespace Name Mixin selector official i
Ldme;i:Ldmk;
intermediary field_19558
Lnet/minecraft/class_4337;field_19558:Lnet/minecraft/class_4351;
named uploadStatus
Lnet/minecraft/client/realms/FileUpload;uploadStatus:Lnet/minecraft/client/realms/UploadStatus;
-
cancelled
- Mappings:
Namespace Name Mixin selector official j
Ldme;j:Ljava/util/concurrent/atomic/AtomicBoolean;
intermediary field_19559
Lnet/minecraft/class_4337;field_19559:Ljava/util/concurrent/atomic/AtomicBoolean;
named cancelled
Lnet/minecraft/client/realms/FileUpload;cancelled:Ljava/util/concurrent/atomic/AtomicBoolean;
-
uploadTask
- Mappings:
Namespace Name Mixin selector official k
Ldme;k:Ljava/util/concurrent/CompletableFuture;
intermediary field_19560
Lnet/minecraft/class_4337;field_19560:Ljava/util/concurrent/CompletableFuture;
named uploadTask
Lnet/minecraft/client/realms/FileUpload;uploadTask:Ljava/util/concurrent/CompletableFuture;
-
requestConfig
private final org.apache.http.client.config.RequestConfig requestConfig- Mappings:
Namespace Name Mixin selector official l
Ldme;l:Lorg/apache/http/client/config/RequestConfig;
intermediary field_19561
Lnet/minecraft/class_4337;field_19561:Lorg/apache/http/client/config/RequestConfig;
named requestConfig
Lnet/minecraft/client/realms/FileUpload;requestConfig:Lorg/apache/http/client/config/RequestConfig;
-
-
Constructor Details
-
FileUpload
public FileUpload(File file, long worldId, int slotId, UploadInfo uploadInfo, Session session, String clientVersion, UploadStatus uploadStatus)- Mappings:
Namespace Name Mixin selector official <init>
Ldme;<init>(Ljava/io/File;JILdng;Ldqx;Ljava/lang/String;Ldmk;)V
intermediary <init>
Lnet/minecraft/class_4337;<init>(Ljava/io/File;JILnet/minecraft/class_4888;Lnet/minecraft/class_320;Ljava/lang/String;Lnet/minecraft/class_4351;)V
named <init>
Lnet/minecraft/client/realms/FileUpload;<init>(Ljava/io/File;JILnet/minecraft/client/realms/dto/UploadInfo;Lnet/minecraft/client/util/Session;Ljava/lang/String;Lnet/minecraft/client/realms/UploadStatus;)V
-
-
Method Details
-
upload
- Mappings:
Namespace Name Mixin selector official a
Ldme;a(Ljava/util/function/Consumer;)V
intermediary method_20973
Lnet/minecraft/class_4337;method_20973(Ljava/util/function/Consumer;)V
named upload
Lnet/minecraft/client/realms/FileUpload;upload(Ljava/util/function/Consumer;)V
-
cancel
public void cancel()- Mappings:
Namespace Name Mixin selector official a
Ldme;a()V
intermediary method_20970
Lnet/minecraft/class_4337;method_20970()V
named cancel
Lnet/minecraft/client/realms/FileUpload;cancel()V
-
requestUpload
- Mappings:
Namespace Name Mixin selector official a
Ldme;a(I)Ldos;
intermediary method_20971
Lnet/minecraft/class_4337;method_20971(I)Lnet/minecraft/class_4429;
named requestUpload
Lnet/minecraft/client/realms/FileUpload;requestUpload(I)Lnet/minecraft/client/realms/gui/screen/UploadResult;
-
cleanup
private void cleanup(org.apache.http.client.methods.HttpPost request, org.apache.http.impl.client.CloseableHttpClient client)- Mappings:
Namespace Name Mixin selector official a
Ldme;a(Lorg/apache/http/client/methods/HttpPost;Lorg/apache/http/impl/client/CloseableHttpClient;)V
intermediary method_20977
Lnet/minecraft/class_4337;method_20977(Lorg/apache/http/client/methods/HttpPost;Lorg/apache/http/impl/client/CloseableHttpClient;)V
named cleanup
Lnet/minecraft/client/realms/FileUpload;cleanup(Lorg/apache/http/client/methods/HttpPost;Lorg/apache/http/impl/client/CloseableHttpClient;)V
-
setupRequest
private void setupRequest(org.apache.http.client.methods.HttpPost request) throws FileNotFoundException- Throws:
FileNotFoundException
- Mappings:
Namespace Name Mixin selector official a
Ldme;a(Lorg/apache/http/client/methods/HttpPost;)V
intermediary method_20976
Lnet/minecraft/class_4337;method_20976(Lorg/apache/http/client/methods/HttpPost;)V
named setupRequest
Lnet/minecraft/client/realms/FileUpload;setupRequest(Lorg/apache/http/client/methods/HttpPost;)V
-
handleResponse
private void handleResponse(org.apache.http.HttpResponse response, UploadResult.Builder uploadResultBuilder) throws IOException- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Ldme;a(Lorg/apache/http/HttpResponse;Ldos$a;)V
intermediary method_20975
Lnet/minecraft/class_4337;method_20975(Lorg/apache/http/HttpResponse;Lnet/minecraft/class_4429$class_4430;)V
named handleResponse
Lnet/minecraft/client/realms/FileUpload;handleResponse(Lorg/apache/http/HttpResponse;Lnet/minecraft/client/realms/gui/screen/UploadResult$Builder;)V
-
shouldRetry
private boolean shouldRetry(long retryDelaySeconds, int currentAttempt)- Mappings:
Namespace Name Mixin selector official a
Ldme;a(JI)Z
intermediary method_20972
Lnet/minecraft/class_4337;method_20972(JI)Z
named shouldRetry
Lnet/minecraft/client/realms/FileUpload;shouldRetry(JI)Z
-
retryUploadAfter
private UploadResult retryUploadAfter(long retryDelaySeconds, int currentAttempt) throws InterruptedException- Throws:
InterruptedException
- Mappings:
Namespace Name Mixin selector official b
Ldme;b(JI)Ldos;
intermediary method_20979
Lnet/minecraft/class_4337;method_20979(JI)Lnet/minecraft/class_4429;
named retryUploadAfter
Lnet/minecraft/client/realms/FileUpload;retryUploadAfter(JI)Lnet/minecraft/client/realms/gui/screen/UploadResult;
-
getRetryDelaySeconds
private long getRetryDelaySeconds(org.apache.http.HttpResponse response)- Mappings:
Namespace Name Mixin selector official a
Ldme;a(Lorg/apache/http/HttpResponse;)J
intermediary method_20974
Lnet/minecraft/class_4337;method_20974(Lorg/apache/http/HttpResponse;)J
named getRetryDelaySeconds
Lnet/minecraft/client/realms/FileUpload;getRetryDelaySeconds(Lorg/apache/http/HttpResponse;)J
-
isFinished
public boolean isFinished()- Mappings:
Namespace Name Mixin selector official b
Ldme;b()Z
intermediary method_20978
Lnet/minecraft/class_4337;method_20978()Z
named isFinished
Lnet/minecraft/client/realms/FileUpload;isFinished()Z
-