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 Configuration
build()
Builds a newConfiguration
using the properties contained in this builder.ConfigurationBuilder
classLoaders(Iterable<ClassLoader> classLoaders)
Sets theClassLoader
used in resolving extension implementations by theExtensionLoader
; other tasks requiring a CL by theArchive
ConfigurationBuilder
executorService(ExecutorService executorService)
Sets theExecutorService
to be used, returning this instanceConfigurationBuilder
extensionLoader(ExtensionLoader extensionLoader)
Sets theExtensionLoader
to be used, returning this instanceIterable<ClassLoader>
getClassLoaders()
ExecutorService
getExecutorService()
ExtensionLoader
getExtensionLoader()
-
-
-
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 theExtensionLoader
to be used, returning this instance- Parameters:
extensionLoader
-- Returns:
-
executorService
public ConfigurationBuilder executorService(ExecutorService executorService)
Sets theExecutorService
to be used, returning this instance- Parameters:
executorService
-- Returns:
-
classLoaders
public ConfigurationBuilder classLoaders(Iterable<ClassLoader> classLoaders)
Sets theClassLoader
used in resolving extension implementations by theExtensionLoader
; other tasks requiring a CL by theArchive
- Parameters:
classLoaders
-- Returns:
-
build
public Configuration build()
Builds a newConfiguration
using 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:
-
-