Package org.jboss.shrinkwrap.api
Class ConfigurationBuilder
- java.lang.Object
-
- org.jboss.shrinkwrap.api.ConfigurationBuilder
-
public class ConfigurationBuilder extends Object
Mutable construction object for new instances ofConfiguration. Provides defaults for each property if not specified (null) according to the following:executorService- Stay null, none is required and ShrinkWrap will create its own and destroy it when done as neededextensionLoader- A new instance of the service extension loader from shrinkwrap-impl
build().- Version:
- $Revision: $
- Author:
- ALR, Ken Gullaksen
-
-
Constructor Summary
Constructors Constructor Description ConfigurationBuilder()Creates a new builder initialized to defaults (null) values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Configurationbuild()Builds a newConfigurationusing the properties contained in this builder.ConfigurationBuilderclassLoaders(Iterable<ClassLoader> classLoaders)Sets theClassLoaderused in resolving extension implementations by theExtensionLoader; other tasks requiring a CL by theArchiveConfigurationBuilderexecutorService(ExecutorService executorService)Sets theExecutorServiceto be used, returning this instanceConfigurationBuilderextensionLoader(ExtensionLoader extensionLoader)Sets theExtensionLoaderto be used, returning this instanceIterable<ClassLoader>getClassLoaders()ExecutorServicegetExecutorService()ExtensionLoadergetExtensionLoader()
-
-
-
Constructor Detail
-
ConfigurationBuilder
public ConfigurationBuilder()
Creates a new builder initialized to defaults (null) values. Any properties not explicitly provided by the user will be defaulted duringbuild().
-
-
Method Detail
-
getExtensionLoader
public ExtensionLoader getExtensionLoader()
- Returns:
- the extensionLoader
-
getExecutorService
public ExecutorService getExecutorService()
- Returns:
- the executorService
-
getClassLoaders
public Iterable<ClassLoader> getClassLoaders()
- Returns:
-
extensionLoader
public ConfigurationBuilder extensionLoader(ExtensionLoader extensionLoader)
Sets theExtensionLoaderto be used, returning this instance- Parameters:
extensionLoader-- Returns:
-
executorService
public ConfigurationBuilder executorService(ExecutorService executorService)
Sets theExecutorServiceto be used, returning this instance- Parameters:
executorService-- Returns:
-
classLoaders
public ConfigurationBuilder classLoaders(Iterable<ClassLoader> classLoaders)
Sets theClassLoaderused in resolving extension implementations by theExtensionLoader; other tasks requiring a CL by theArchive- Parameters:
classLoaders-- Returns:
-
build
public Configuration build()
Builds a newConfigurationusing the properties contained in this builder. In the case a property has not been specified, it will be defaulted according to the rules set forth in thisConfigurationBuilder's contract.- Returns:
-
-