Module org.update4j

Class DefaultBootstrap

Object
DefaultBootstrap
All Implemented Interfaces:
Injectable, Delegate, Service

public class DefaultBootstrap extends Object implements Delegate
  • Constructor Details

    • DefaultBootstrap

      public DefaultBootstrap()
  • Method Details

    • version

      public long version()
      Specified by:
      version in interface Service
    • getRemote

      public String getRemote()
    • getLocal

      public String getLocal()
    • getArchivePath

      public String getArchivePath()
    • getCert

      public String getCert()
    • isSyncLocal

      public boolean isSyncLocal()
    • isLaunchFirst

      public boolean isLaunchFirst()
    • isStopOnUpdateError

      public boolean isStopOnUpdateError()
    • isSingleInstance

      public boolean isSingleInstance()
    • getPublicKey

      public PublicKey getPublicKey()
    • getBusinessArgs

      public List<String> getBusinessArgs()
    • main

      public void main(List<String> args) throws Throwable
      Description copied from interface: Delegate
      The bootstrap's main method, if you start it via the Bootstrap class or run update4j as a jar file.

      This method is called after dependency injection was performed using any overload of Bootstrap.start() that takes an Injectable.

      To do any initialization before injection, do it in the constructor, but be aware that unless you specify the delegate with the --delegate flag, the constructor might be called even if this provider will not be used in the end. This happens as the service loading mechanism first loads all providers and then compares versions to use the one with the highest version.

      Specified by:
      main in interface Delegate
      Parameters:
      args - Command line arguments
      Throws:
      Throwable
    • parseArgs

      protected void parseArgs(List<String> bootArgs)
    • updateFirst

      protected void updateFirst() throws Throwable
      Throws:
      Throwable
    • launchFirst

      protected void launchFirst() throws Throwable
      Throws:
      Throwable
    • openConnection

      protected Reader openConnection(URL url) throws IOException
      Throws:
      IOException
    • getLocalConfig

      protected Configuration getLocalConfig(boolean ignoreFileNotFound)
    • getRemoteConfig

      protected Configuration getRemoteConfig()
    • syncLocal

      protected void syncLocal(Configuration remoteConfig)