Class LaunchServer

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Runnable, Reconfigurable

    public final class LaunchServer
    extends java.lang.Object
    implements java.lang.Runnable, java.lang.AutoCloseable, Reconfigurable
    • Field Detail

      • dir

        public final java.nio.file.Path dir
      • launcherLibraries

        public final java.nio.file.Path launcherLibraries
      • launcherLibrariesCompile

        public final java.nio.file.Path launcherLibrariesCompile
      • caCertFile

        public final java.nio.file.Path caCertFile
      • caKeyFile

        public final java.nio.file.Path caKeyFile
      • serverCertFile

        public final java.nio.file.Path serverCertFile
      • serverKeyFile

        public final java.nio.file.Path serverKeyFile
      • updatesDir

        public final java.nio.file.Path updatesDir
      • profilesDir

        public final java.nio.file.Path profilesDir
      • publicKey

        public final java.security.interfaces.ECPublicKey publicKey
      • privateKey

        public final java.security.interfaces.ECPrivateKey privateKey
      • launcherEXEBinaryClass

        public final java.lang.Class<? extends LauncherBinary> launcherEXEBinaryClass
      • configManager

        public final pro.gravit.launcher.managers.ConfigManager configManager
      • commandHandler

        public final pro.gravit.utils.command.CommandHandler commandHandler
      • updatesDirMap

        public volatile java.util.Map<java.lang.String,​pro.gravit.launcher.hasher.HashedDir> updatesDirMap
      • taskPool

        public final java.util.Timer taskPool
      • defaultLauncherEXEBinaryClass

        public static final java.lang.Class<? extends LauncherBinary> defaultLauncherEXEBinaryClass
    • Method Detail

      • reload

        public void reload​(LaunchServer.ReloadType type)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getCommands

        public java.util.Map<java.lang.String,​pro.gravit.utils.command.Command> getCommands()
        Description copied from interface: Reconfigurable
        Gets a list of commands available for this object.
        Specified by:
        getCommands in interface Reconfigurable
        Returns:
        Key - Command Name Value is a command object
      • buildLauncherBinaries

        public void buildLauncherBinaries()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • getProfiles

        public java.util.List<pro.gravit.launcher.profiles.ClientProfile> getProfiles()
      • setProfiles

        public void setProfiles​(java.util.List<pro.gravit.launcher.profiles.ClientProfile> profilesList)
      • getUpdateDir

        public pro.gravit.launcher.hasher.HashedDir getUpdateDir​(java.lang.String name)
      • getUpdateDirs

        public java.util.Set<java.util.Map.Entry<java.lang.String,​pro.gravit.launcher.hasher.HashedDir>> getUpdateDirs()
      • rebindNettyServerSocket

        public void rebindNettyServerSocket()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • syncLauncherBinaries

        public void syncLauncherBinaries()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • syncProfilesDir

        public void syncProfilesDir()
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • syncUpdatesDir

        public void syncUpdatesDir​(java.util.Collection<java.lang.String> dirs)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • restart

        public void restart()
      • registerObject

        public void registerObject​(java.lang.String name,
                                   java.lang.Object object)
      • unregisterObject

        public void unregisterObject​(java.lang.String name,
                                     java.lang.Object object)
      • fullyRestart

        public void fullyRestart()