MagmaguyRspClient
Reusable HTTP client for the magmaguy.com resource-pack hosting API.
This client is stateless with respect to session: callers (e.g. AutoHost) supply the per-call uuid/sha1 arguments and own the lifecycle of any keep-alive scheduling. The client only handles HTTP request/response plumbing.
An in-flight cancellation mechanism is provided via abortInFlight. Every shared or per-upload client is tracked so concurrent keep-alive, relay, and pack uploads are all torn down promptly during plugin disable.
Constructors
Link copied to clipboard
public void MagmaguyRspClient(Logger logger, int defaultSocketTimeoutSeconds, int uploadSocketTimeoutSeconds)
Types
Link copied to clipboard
Direct backend HTTP endpoint announced by a Bukkit backend.
Link copied to clipboard
One entry in a network's relay index.
Link copied to clipboard
Result of a probe call.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Result of a sha1Check call.
Link copied to clipboard
Functions
Link copied to clipboard
Abort any in-flight blocking request by closing the underlying HTTP client.
Link copied to clipboard
public Optional<MagmaguyRspClient.BedrockEndpoint> announceBedrockEndpoint(String networkKey, String backendId, String publicHostOrNull, int mcPort, int httpPort)
Announce the backend's actual RSPM HTTP port.
Link copied to clipboard
public MagmaguyRspClient.RelayDeleteResult deleteBedrockRelay(String networkKey, String backendId, String kindOrNull)
Drop a backend's relay entry (or both kinds if
kindOrNull == null).Link copied to clipboard
public MagmaguyRspClient.RelayDeleteResult deleteBedrockRelayOnShutdown(String networkKey, String backendId)
Independent two-second delete path that remains usable after abortInFlight().
Link copied to clipboard
Best-effort public IPv4 detection.
Link copied to clipboard
public MagmaguyRspClient.RelayDownloadResult downloadBedrockRelay(String networkKeyHash, String backendId, String kind, File dest)
Download a relay entry to
dest.Link copied to clipboard
POST
/rsp/data_compliance — downloads the data-compliance zip into the given destination file.Link copied to clipboard
POST
/rsp/initialize.Link copied to clipboard
Explicitly disables only the distributed Bedrock endpoint registry and relay calls.
Link copied to clipboard
List fresh direct-backend endpoint announcements for this network.
Link copied to clipboard
List all live relay entries for the given network.
Link copied to clipboard
Ask the hoster to fetch the given URL from its public network vantage and report back whether the URL is reachable.
Link copied to clipboard
POST
/rsp/sha1.Link copied to clipboard
POST
/rsp/still_alive.Link copied to clipboard
POST
/rsp/upload.Uploads a pack while asking the hoster to verify that the received bytes match the SHA1 that triggered publication.
Link copied to clipboard
public Optional<MagmaguyRspClient.BedrockRelayEntry> uploadBedrockRelay(String networkKey, String backendId, String kind, File file, String sha1HexOrNull)
Upload a Bedrock pack (
kind="zip") or Geyser mappings file (kind="mappings") to the relay under this network.