Package org.smooks.engine
Class DefaultApplicationContextBuilder
- java.lang.Object
-
- org.smooks.engine.DefaultApplicationContextBuilder
-
- All Implemented Interfaces:
ApplicationContextBuilder
public class DefaultApplicationContextBuilder extends Object implements ApplicationContextBuilder
-
-
Constructor Summary
Constructors Modifier Constructor Description DefaultApplicationContextBuilder()
protected
DefaultApplicationContextBuilder(boolean systemResources, ClassLoader classLoader, Registry registry, ContentDeliveryRuntimeFactory contentDeliveryRuntimeFactory, ContainerResourceLocator resourceLocator, ResourceConfigLoader resourceConfigLoader, ReaderPoolFactory readerPoolFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationContext
build()
protected void
initRegistry(ApplicationContext applicationContext, Registry registry)
protected void
registerSystemContentHandlerFactories(Registry registry)
protected void
registerSystemResources(Registry registry, ApplicationContext applicationContext)
DefaultApplicationContextBuilder
withClassLoader(ClassLoader classLoader)
Sets the class loader for the application context.DefaultApplicationContextBuilder
withContentDeliveryRuntimeFactory(ContentDeliveryRuntimeFactory contentDeliveryRuntimeFactory)
Sets the content delivery runtime factory for the application context.DefaultApplicationContextBuilder
withReaderPoolFactory(ReaderPoolFactory readerPoolFactory)
Sets reader pool factory for the application context.DefaultApplicationContextBuilder
withRegistry(Registry registry)
Sets the registry for the application context.DefaultApplicationContextBuilder
withResourceConfigLoader(ResourceConfigLoader resourceConfigLoader)
Sets the resource config loader for the application context.DefaultApplicationContextBuilder
withResourceLocator(ContainerResourceLocator resourceLocator)
Sets the resource locator for the application context.DefaultApplicationContextBuilder
withSystemResources(boolean systemResources)
-
-
-
Constructor Detail
-
DefaultApplicationContextBuilder
public DefaultApplicationContextBuilder()
-
DefaultApplicationContextBuilder
protected DefaultApplicationContextBuilder(boolean systemResources, ClassLoader classLoader, Registry registry, ContentDeliveryRuntimeFactory contentDeliveryRuntimeFactory, ContainerResourceLocator resourceLocator, ResourceConfigLoader resourceConfigLoader, ReaderPoolFactory readerPoolFactory)
-
-
Method Detail
-
withClassLoader
public DefaultApplicationContextBuilder withClassLoader(ClassLoader classLoader)
Description copied from interface:ApplicationContextBuilder
Sets the class loader for the application context.- Specified by:
withClassLoader
in interfaceApplicationContextBuilder
- Parameters:
classLoader
- class loader to use for the application context- Returns:
- a shallow copy of
this
withclassLoader
set to the given value
-
withSystemResources
public DefaultApplicationContextBuilder withSystemResources(boolean systemResources)
-
withRegistry
public DefaultApplicationContextBuilder withRegistry(Registry registry)
Description copied from interface:ApplicationContextBuilder
Sets the registry for the application context.- Specified by:
withRegistry
in interfaceApplicationContextBuilder
- Parameters:
registry
- registry to use for the application context- Returns:
- a shallow copy of
this
withregistry
set to the given value
-
withContentDeliveryRuntimeFactory
public DefaultApplicationContextBuilder withContentDeliveryRuntimeFactory(ContentDeliveryRuntimeFactory contentDeliveryRuntimeFactory)
Description copied from interface:ApplicationContextBuilder
Sets the content delivery runtime factory for the application context.- Specified by:
withContentDeliveryRuntimeFactory
in interfaceApplicationContextBuilder
- Parameters:
contentDeliveryRuntimeFactory
- content delivery runtime factory to use for the application context- Returns:
- a shallow copy of
this
withcontentDeliveryRuntimeFactory
set to the given value
-
withResourceLocator
public DefaultApplicationContextBuilder withResourceLocator(ContainerResourceLocator resourceLocator)
Description copied from interface:ApplicationContextBuilder
Sets the resource locator for the application context.- Specified by:
withResourceLocator
in interfaceApplicationContextBuilder
- Parameters:
resourceLocator
- resource locator to use for the application context- Returns:
- a shallow copy of
this
withresourceLocator
set to the given value
-
withResourceConfigLoader
public DefaultApplicationContextBuilder withResourceConfigLoader(ResourceConfigLoader resourceConfigLoader)
Description copied from interface:ApplicationContextBuilder
Sets the resource config loader for the application context.- Specified by:
withResourceConfigLoader
in interfaceApplicationContextBuilder
- Parameters:
resourceConfigLoader
- resource config loader to use for the application context- Returns:
- a shallow copy of
this
withresourceConfigLoader
set to the given value
-
withReaderPoolFactory
public DefaultApplicationContextBuilder withReaderPoolFactory(ReaderPoolFactory readerPoolFactory)
Description copied from interface:ApplicationContextBuilder
Sets reader pool factory for the application context.- Specified by:
withReaderPoolFactory
in interfaceApplicationContextBuilder
- Parameters:
readerPoolFactory
- reader pool factory to use for the application context- Returns:
- a shallow copy of
this
withreaderPoolFactory
set to the given value
-
build
public ApplicationContext build()
- Specified by:
build
in interfaceApplicationContextBuilder
- Returns:
- a new application context
-
initRegistry
protected void initRegistry(ApplicationContext applicationContext, Registry registry)
-
registerSystemContentHandlerFactories
protected void registerSystemContentHandlerFactories(Registry registry)
-
registerSystemResources
protected void registerSystemResources(Registry registry, ApplicationContext applicationContext)
-
-