Class LegacyFabricInstaller

  • All Implemented Interfaces:

    
    public final class LegacyFabricInstaller
    
                        

    Information about the LegacyFabric installer and versions.

    Author:

    Griefed

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<String> getAllVersions() Every LegacyFabric installer version, newest first.
      final String getInstallerUrlTemplate() URL template the installer download is built from, with the version substituted in.
      final String getLatest() Newest installer version the manifest advertises, or null before the manifest has been read.
      final String getRelease() Newest stable installer version, or null before the manifest has been read.
      final Unit update() Update all lists of available versions with new information gathered from the manifest.
      final URL latestURL() The URL to the latest installer for Legacy Fabric.
      final URL releaseURL() The URL to the release installer for Legacy Fabric.
      final Optional<URL> specificURL(String version) Get the URL for a specific installer version, wrapped in an Optional.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LegacyFabricInstaller

        LegacyFabricInstaller(File installerManifest, Utilities utilities)
        Parameters:
        installerManifest - Manifest containing information about LegacyFabric installer versions.
        utilities - Commonly used utilities across ServerPackCreator.
    • Method Detail

      • getAllVersions

         final List<String> getAllVersions()

        Every LegacyFabric installer version, newest first. A separate series from the loader versions.

        Published as an immutable snapshot behind @Volatile, not as a collection update mutates in place. The refresh runs on a background coroutine while callers read; clearing and refilling a shared list let a reader throw ConcurrentModificationException or silently observe the empty window between the two.

      • getInstallerUrlTemplate

         final String getInstallerUrlTemplate()

        URL template the installer download is built from, with the version substituted in.

      • getLatest

         final String getLatest()

        Newest installer version the manifest advertises, or null before the manifest has been read.

      • getRelease

         final String getRelease()

        Newest stable installer version, or null before the manifest has been read.

      • update

         final Unit update()

        Update all lists of available versions with new information gathered from the manifest.

      • latestURL

         final URL latestURL()

        The URL to the latest installer for Legacy Fabric.

        Returns:

        URL to the latest installer for Legacy Fabric.

      • releaseURL

         final URL releaseURL()

        The URL to the release installer for Legacy Fabric.

        Returns:

        URL to the release installer for Legacy Fabric.

      • specificURL

         final Optional<URL> specificURL(String version)

        Get the URL for a specific installer version, wrapped in an Optional.

        Parameters:
        version - The version of the installer for which to get the URL.
        Returns:

        URL to the installer, for the specified version, wrapped in an Optional.