Class FileUpload

java.lang.Object
com.mojang.realmsclient.client.FileUpload

public class FileUpload extends Object
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • file

      private final File file
    • worldId

      private final long worldId
    • slotId

      private final int slotId
    • uploadInfo

      private final UploadInfo uploadInfo
    • sessionId

      private final String sessionId
    • username

      private final String username
    • clientVersion

      private final String clientVersion
    • uploadStatus

      private final UploadStatus uploadStatus
    • cancelled

      private final AtomicBoolean cancelled
    • uploadTask

      private CompletableFuture<UploadResult> uploadTask
    • requestConfig

      private final org.apache.http.client.config.RequestConfig requestConfig
  • Constructor Details

  • Method Details

    • upload

      public void upload(Consumer<UploadResult> p_224874_1_)
    • cancel

      public void cancel()
    • requestUpload

      private UploadResult requestUpload(int p_224879_1_)
    • cleanup

      private void cleanup(org.apache.http.client.methods.HttpPost p_224877_1_, org.apache.http.impl.client.CloseableHttpClient p_224877_2_)
    • setupRequest

      private void setupRequest(org.apache.http.client.methods.HttpPost p_224872_1_) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • handleResponse

      private void handleResponse(org.apache.http.HttpResponse p_224875_1_, UploadResult.Builder p_224875_2_) throws IOException
      Throws:
      IOException
    • shouldRetry

      private boolean shouldRetry(long p_224882_1_, int p_224882_3_)
    • retryUploadAfter

      private UploadResult retryUploadAfter(long p_224876_1_, int p_224876_3_) throws InterruptedException
      Throws:
      InterruptedException
    • getRetryDelaySeconds

      private long getRetryDelaySeconds(org.apache.http.HttpResponse p_224880_1_)
    • isFinished

      public boolean isFinished()