Class FileUpload

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

public class FileUpload extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • MAX_RETRIES

      private static final int MAX_RETRIES
      See Also:
    • UPLOAD_PATH

      private static final String UPLOAD_PATH
      See Also:
    • 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

      @Nullable 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_87085_)
    • cancel

      public void cancel()
    • requestUpload

      private UploadResult requestUpload(int p_87080_)
    • cleanup

      private void cleanup(org.apache.http.client.methods.HttpPost p_87094_, @Nullable org.apache.http.impl.client.CloseableHttpClient p_87095_)
    • setupRequest

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

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

      private boolean shouldRetry(long p_87082_, int p_87083_)
    • retryUploadAfter

      private UploadResult retryUploadAfter(long p_87098_, int p_87099_) throws InterruptedException
      Throws:
      InterruptedException
    • getRetryDelaySeconds

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

      public boolean isFinished()