Class Configuration.Builder

    • Method Detail

      • of

        public static Configuration.Builder of​(File jbossHome)
        Creates a new builder for the configuration.
        Parameters:
        jbossHome - the servers home directory
      • of

        public static Configuration.Builder of​(Path jbossHome)
        Creates a new builder for the configuration.
        Parameters:
        jbossHome - the servers home directory
      • addCommandArgument

        public Configuration.Builder addCommandArgument​(String arg)
        Adds a command argument.
        Parameters:
        arg - the argument to add, if null the argument is ignored
        Returns:
        this builder
      • addCommandArguments

        public Configuration.Builder addCommandArguments​(String... args)
        Adds the arguments to the command line arguments,
        Parameters:
        args - the arguments to add, if null the argument is ignored
        Returns:
        this builder
      • setCommandArguments

        public Configuration.Builder setCommandArguments​(String... args)
        Sets the command line arguments replacing any previously set arguments.
        Parameters:
        args - the arguments to set, if null the arguments are cleared
        Returns:
        this builder
      • setLoggerHint

        public Configuration.Builder setLoggerHint​(Configuration.LoggerHint loggerHint)
        Sets a hint for the JBoss Logging facade on which log manager the loggers so delegate to.

        Sets the org.jboss.logging.provider system property and adds the hinted logging module to the list of system packages.

        Parameters:
        loggerHint - the logger hint
        Returns:
        this builder
      • setModuleLoader

        public Configuration.Builder setModuleLoader​(org.jboss.modules.ModuleLoader moduleLoader)
        Sets the module loader. If the value is null a default module loader will be configured and used.
        Parameters:
        moduleLoader - the module loader or null to use the default
        Returns:
        this builder
      • setModulePath

        public Configuration.Builder setModulePath​(String modulePath)
        Sets the path to the modules for the server. If null the system property module.path will be used if present. If the property is not present the modules directory will be determined from the servers home directory.

        Note that this value is only used if the module loader is null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.

        Parameters:
        modulePath - the module path
        Returns:
        this builder
      • addSystemPackage

        public Configuration.Builder addSystemPackage​(String systemPackage)
        Adds a system package for the module loader.

        Note that this value is only used if the module loader is null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.

        Parameters:
        systemPackage - the system package to add, null values are ignored
        Returns:
        this builder
      • addSystemPackages

        public Configuration.Builder addSystemPackages​(String... systemPackages)
        Adds the system packages for the module loader.

        Note that this value is only used if the module loader is null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.

        Parameters:
        systemPackages - the system packages to add, null values are ignored
        Returns:
        this builder
      • setSystemPackages

        public Configuration.Builder setSystemPackages​(String... systemPackages)
        Sets the system packages for the module loader.

        Note that this value is only used if the module loader is null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.

        Parameters:
        systemPackages - the system package to add, null clears the previously set system packages
        Returns:
        this builder
      • build

        public Configuration build()
        Creates a new immutable configuration.
        Returns:
        the configuration