public class ConfigurationBuilder extends Object
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-implbuild()
.Constructor and Description |
---|
ConfigurationBuilder()
Creates a new builder initialized to defaults (null) values.
|
Modifier and Type | Method and Description |
---|---|
Configuration |
build()
Builds a new
Configuration using the properties contained in this builder. |
ConfigurationBuilder |
classLoaders(Iterable<ClassLoader> classLoaders)
Sets the
ClassLoader used in resolving extension implementations by the ExtensionLoader ; other
tasks requiring a CL by the Archive |
ConfigurationBuilder |
executorService(ExecutorService executorService)
Sets the
ExecutorService to be used, returning this instance |
ConfigurationBuilder |
extensionLoader(ExtensionLoader extensionLoader)
Sets the
ExtensionLoader to be used, returning this instance |
Iterable<ClassLoader> |
getClassLoaders() |
ExecutorService |
getExecutorService() |
ExtensionLoader |
getExtensionLoader() |
public ConfigurationBuilder()
build()
.public ExtensionLoader getExtensionLoader()
public ExecutorService getExecutorService()
public Iterable<ClassLoader> getClassLoaders()
public ConfigurationBuilder extensionLoader(ExtensionLoader extensionLoader)
ExtensionLoader
to be used, returning this instanceextensionLoader
- public ConfigurationBuilder executorService(ExecutorService executorService)
ExecutorService
to be used, returning this instanceexecutorService
- public ConfigurationBuilder classLoaders(Iterable<ClassLoader> classLoaders)
ClassLoader
used in resolving extension implementations by the ExtensionLoader
; other
tasks requiring a CL by the Archive
classLoaders
- public Configuration build()
Configuration
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 this ConfigurationBuilder
's
contract.Copyright © 2016 JBoss by Red Hat. All rights reserved.