Class ConfigurationBuilder
java.lang.Object
org.jboss.shrinkwrap.api.ConfigurationBuilder
Mutable construction object for new instances of
Configuration. 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
ConstructorsConstructorDescriptionCreates a new builder initialized to defaults (null) values. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newConfigurationusing the properties contained in this builder.classLoaders(Iterable<ClassLoader> classLoaders) Sets theClassLoaderused in resolving extension implementations by theExtensionLoader; other tasks requiring a CL by theArchiveexecutorService(ExecutorService executorService) Sets theExecutorServiceto be used, returning this instanceextensionLoader(ExtensionLoader extensionLoader) Sets theExtensionLoaderto be used, returning this instance
-
Constructor Details
-
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 Details
-
getExtensionLoader
- Returns:
- the extensionLoader
-
getExecutorService
- Returns:
- the executorService
-
getClassLoaders
- Returns:
- the classLoader
-
extensionLoader
Sets theExtensionLoaderto be used, returning this instance- Parameters:
extensionLoader- TheExtensionLoaderto be set- Returns:
- the current instance of
ConfigurationBuilder
-
executorService
Sets theExecutorServiceto be used, returning this instance- Parameters:
executorService- TheExecutorServiceto be set- Returns:
- the current instance of
ConfigurationBuilder
-
classLoaders
Sets theClassLoaderused in resolving extension implementations by theExtensionLoader; other tasks requiring a CL by theArchive- Parameters:
classLoaders- AnIterableofClassLoaders to be used for resolving extensions- Returns:
- the current instance of
ConfigurationBuilder
-
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:
- a new
Configurationinstance
-