Package com.mojang.realmsclient.client
Class FileUpload
java.lang.Object
com.mojang.realmsclient.client.FileUpload
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) static class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final AtomicBooleanprivate final Stringprivate final Fileprivate static final org.slf4j.Loggerprivate static final intprivate final org.apache.http.client.config.RequestConfigprivate final Stringprivate final intprivate static final Stringprivate final UploadInfoprivate final UploadStatusprivate CompletableFuture<UploadResult>private final Stringprivate final long
- 
Constructor SummaryConstructorsConstructorDescriptionFileUpload(File p_87071_, long p_87072_, int p_87073_, UploadInfo p_87074_, User p_87075_, String p_87076_, UploadStatus p_87077_) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidcancel()private voidcleanup(org.apache.http.client.methods.HttpPost p_87094_, org.apache.http.impl.client.CloseableHttpClient p_87095_) private longgetRetryDelaySeconds(org.apache.http.HttpResponse p_87087_) private voidhandleResponse(org.apache.http.HttpResponse p_87089_, UploadResult.Builder p_87090_) booleanprivate UploadResultrequestUpload(int p_87080_) private UploadResultretryUploadAfter(long p_87098_, int p_87099_) private voidsetupRequest(org.apache.http.client.methods.HttpPost p_87092_) private booleanshouldRetry(long p_87082_, int p_87083_) voidupload(Consumer<UploadResult> p_87085_) 
- 
Field Details- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
MAX_RETRIESprivate static final int MAX_RETRIES- See Also:
 
- 
UPLOAD_PATH- See Also:
 
- 
file
- 
worldIdprivate final long worldId
- 
slotIdprivate final int slotId
- 
uploadInfo
- 
sessionId
- 
username
- 
clientVersion
- 
uploadStatus
- 
cancelled
- 
uploadTask
- 
requestConfigprivate final org.apache.http.client.config.RequestConfig requestConfig
 
- 
- 
Constructor Details- 
FileUploadpublic FileUpload(File p_87071_, long p_87072_, int p_87073_, UploadInfo p_87074_, User p_87075_, String p_87076_, UploadStatus p_87077_) 
 
- 
- 
Method Details- 
upload
- 
cancelpublic void cancel()
- 
requestUpload
- 
cleanupprivate void cleanup(org.apache.http.client.methods.HttpPost p_87094_, @Nullable org.apache.http.impl.client.CloseableHttpClient p_87095_) 
- 
setupRequestprivate void setupRequest(org.apache.http.client.methods.HttpPost p_87092_) throws FileNotFoundException - Throws:
- FileNotFoundException
 
- 
handleResponseprivate void handleResponse(org.apache.http.HttpResponse p_87089_, UploadResult.Builder p_87090_) throws IOException - Throws:
- IOException
 
- 
shouldRetryprivate boolean shouldRetry(long p_87082_, int p_87083_) 
- 
retryUploadAfter- Throws:
- InterruptedException
 
- 
getRetryDelaySecondsprivate long getRetryDelaySeconds(org.apache.http.HttpResponse p_87087_) 
- 
isFinishedpublic boolean isFinished()
 
-