Class L2pNodeLauncherConfiguration

java.lang.Object
i5.las2peer.tools.helper.L2pNodeLauncherConfiguration

public class L2pNodeLauncherConfiguration extends Object
  • Field Details

  • Constructor Details

    • L2pNodeLauncherConfiguration

      public L2pNodeLauncherConfiguration()
  • Method Details

    • createFromMainArgs

      public static L2pNodeLauncherConfiguration createFromMainArgs(String... argv)
      Usually the OS splits up the parameters on spaces. This breaks commands like startService(xxx, yyy), which may use spaces to separate their own arguments. This method uses the given brakets to join system arguments like [startService(xxx,] and [yyy)] into [startService(xxx, yyy)]. Usually it should be used in main(String[] args) methods.
      Parameters:
      argv -
      Returns:
      Returns the configuration created from given args
    • setFromMainArgs

      public void setFromMainArgs(String... argv)
    • createFromArrayArgs

      public static L2pNodeLauncherConfiguration createFromArrayArgs(String... args)
    • createFromIterableArgs

      public static L2pNodeLauncherConfiguration createFromIterableArgs(Iterable<String> args) throws IllegalArgumentException
      Creates a launch configuration for the L2pNodeLauncher from the given bunch of arguments.
      Parameters:
      args - A bunch of arguments that should be used as configuration values.
      Returns:
      Returns the configuration.
      Throws:
      IllegalArgumentException - If an issue occurs parsing an argument.
    • setFromIterableArgs

      public void setFromIterableArgs(Iterable<String> args) throws IllegalArgumentException
      Sets launch configuration from the given bunch of arguments.
      Parameters:
      args - A bunch of arguments that should be used as configuration values.
      Throws:
      IllegalArgumentException - If an issue occurs parsing an argument.
    • setFromFile

      public void setFromFile() throws IOException
      Throws:
      IOException
    • setFromFile

      public void setFromFile(String filename) throws IOException
      Throws:
      IOException
    • setFromInput

      public void setFromInput(InputStream inputStream) throws IOException
      Throws:
      IOException
    • writeToFile

      public void writeToFile()
    • writeToFile

      public void writeToFile(String filename)
    • isPrintHelp

      public boolean isPrintHelp()
    • setPrintHelp

      public void setPrintHelp(boolean printHelp)
    • isPrintVersion

      public boolean isPrintVersion()
    • setPrintVersion

      public void setPrintVersion(boolean printVersion)
    • isColoredOutput

      public boolean isColoredOutput()
    • setColoredOutput

      public void setColoredOutput(boolean coloredOutput)
    • isDebugMode

      public boolean isDebugMode()
    • setDebugMode

      public void setDebugMode(boolean debugMode)
    • isSandbox

      public boolean isSandbox()
    • setSandbox

      public void setSandbox(boolean sandbox)
    • getBindAddress

      public InetAddress getBindAddress()
    • setBindAddress

      public void setBindAddress(InetAddress bindAddress)
    • getPort

      public Integer getPort()
    • setPort

      public void setPort(Integer port)
    • getBootstrap

      public List<String> getBootstrap()
    • setBootstrap

      public void setBootstrap(List<String> bootstrap)
    • setBootstrap

      public void setBootstrap(String bootstrap)
    • addBootstrap

      public void addBootstrap(String bootstrap)
    • getStorageMode

      public SharedStorage.STORAGE_MODE getStorageMode()
    • setStorageMode

      public void setStorageMode(SharedStorage.STORAGE_MODE storageMode)
    • useMonitoringObserver

      public Boolean useMonitoringObserver()
    • setUseMonitoringObserver

      public void setUseMonitoringObserver(boolean useMonitoringObserver)
    • getLogDir

      public String getLogDir()
    • setLogDir

      public void setLogDir(String logDir)
    • getServiceDirectories

      public Set<String> getServiceDirectories()
    • getNodeIdSeed

      public Long getNodeIdSeed()
    • setNodeIdSeed

      public void setNodeIdSeed(Long nodeIdSeed)
    • getCommands

      public List<String> getCommands()
    • getStorageDirectory

      public String getStorageDirectory()
    • setStorageDirectory

      public void setStorageDirectory(String storageDirectory)
    • getEthereumMnemonic

      public String getEthereumMnemonic()
    • setEthereumMnemonic

      public void setEthereumMnemonic(String ethereumMnemonic)
    • getEthereumPassword

      public String getEthereumPassword()
    • setEthereumPassword

      public void setEthereumPassword(String ethereumPassword)