Package org.jboss.shrinkwrap.api
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: $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Iterable<ClassLoader> ClassLoaders used for extension loading, adding resources, etcprivate ExecutorServiceExecutorServiceused for all asynchronous operationsprivate static final StringImplementation class name of the defaultExtensionLoaderto be usedprivate ExtensionLoaderLoader mapping archive types to the appropriate underlying implementationprivate static final LoggerLogger -
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 theArchive(package private) ExtensionLoaderObtains the defaultExtensionLoaderto be used if none is specifiedexecutorService(ExecutorService executorService) Sets theExecutorServiceto be used, returning this instanceextensionLoader(ExtensionLoader extensionLoader) Sets theExtensionLoaderto be used, returning this instance(package private) voidSets properties to their default values if they haven't been explicitly provided by the user.
-
Field Details
-
log
Logger -
EXTENSION_LOADER_IMPL
Implementation class name of the defaultExtensionLoaderto be used- See Also:
-
extensionLoader
Loader mapping archive types to the appropriate underlying implementation -
executorService
ExecutorServiceused for all asynchronous operations -
classLoaders
ClassLoaders used for extension loading, adding resources, etc
-
-
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:
-
extensionLoader
Sets theExtensionLoaderto be used, returning this instance- Parameters:
extensionLoader-- Returns:
-
executorService
Sets theExecutorServiceto be used, returning this instance- Parameters:
executorService-- Returns:
-
classLoaders
Sets theClassLoaderused in resolving extension implementations by theExtensionLoader; other tasks requiring a CL by theArchive- Parameters:
classLoaders-- Returns:
-
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:
-
setDefaults
void setDefaults()Sets properties to their default values if they haven't been explicitly provided by the user. If no ClassLoaders are specified, use the TCCL. -
createDefaultExtensionLoader
ExtensionLoader createDefaultExtensionLoader()Obtains the defaultExtensionLoaderto be used if none is specified- Returns:
-