Class PageClassLoaderContextManagerImpl
java.lang.Object
org.apache.tapestry5.services.pageload.PageClassLoaderContextManagerImpl
- All Implemented Interfaces:
PageClassLoaderContextManager
public class PageClassLoaderContextManagerImpl
extends Object
implements PageClassLoaderContextManager
Default PageClassLoaderContextManager implementation.
- Since:
- 5.8.3
-
Constructor Summary
ConstructorsConstructorDescriptionPageClassLoaderContextManagerImpl
(ComponentDependencyRegistry componentDependencyRegistry, ComponentClassResolver componentClassResolver, InternalComponentInvalidationEventHub invalidationHub, InvalidationEventHub componentClassesInvalidationEventHub, boolean productionMode, boolean multipleClassLoaders) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears any state held by this manager.void
Removes one specific class from this manager, invalidating the context where it is.Processes a class, given its class name and the root context.Class<?>
getClassInstance
(Class<?> clasz, String pageName) Returns the Class instance appropriate for a given component given a page name.getRoot()
Returns the root context.void
initialize
(PageClassLoaderContext root, Function<ClassLoader, PlasticProxyFactory> plasticProxyFactoryProvider) Initializes this service with the root context and a Plastic proxy factory provider.invalidate
(PageClassLoaderContext... contexts) Invalidates page classloader contexts and returns a set containing the names of all classes that should be invalidated.void
Invalidates page classloader contexts and invalidates the classes in the context as well.void
Invalidates the "unknown" page classloader context context.boolean
Returns whether contexts are being merged.void
preload()
Preloads all data, first by collecting dependency data for all existing pages and the components, mixins and superclasses they use, then creating the page classloader contexts.void
Preloads the page classloader contexts.
-
Constructor Details
-
PageClassLoaderContextManagerImpl
public PageClassLoaderContextManagerImpl(ComponentDependencyRegistry componentDependencyRegistry, ComponentClassResolver componentClassResolver, InternalComponentInvalidationEventHub invalidationHub, @ComponentClasses InvalidationEventHub componentClassesInvalidationEventHub, @Symbol("tapestry.production-mode") boolean productionMode, @Symbol("tapestry.multiple-classloaders") boolean multipleClassLoaders)
-
-
Method Details
-
invalidateUnknownContext
Description copied from interface:PageClassLoaderContextManager
Invalidates the "unknown" page classloader context context.- Specified by:
invalidateUnknownContext
in interfacePageClassLoaderContextManager
-
initialize
public void initialize(PageClassLoaderContext root, Function<ClassLoader, PlasticProxyFactory> plasticProxyFactoryProvider) Description copied from interface:PageClassLoaderContextManager
Initializes this service with the root context and a Plastic proxy factory provider. Method can only be called once. None of the parameters may be null.- Specified by:
initialize
in interfacePageClassLoaderContextManager
-
get
Description copied from interface:PageClassLoaderContextManager
Processes a class, given its class name and the root context.- Specified by:
get
in interfacePageClassLoaderContextManager
- Parameters:
className
- the class fully qualified name. ClassLoader} and returns a new PlasticProxyFactory.- Returns:
- the
PageClassLoaderContext
associated with that class.
-
clear
Description copied from interface:PageClassLoaderContextManager
Removes one specific class from this manager, invalidating the context where it is.- Specified by:
clear
in interfacePageClassLoaderContextManager
-
invalidate
Description copied from interface:PageClassLoaderContextManager
Invalidates page classloader contexts and returns a set containing the names of all classes that should be invalidated.- Specified by:
invalidate
in interfacePageClassLoaderContextManager
-
invalidateAndFireInvalidationEvents
Description copied from interface:PageClassLoaderContextManager
Invalidates page classloader contexts and invalidates the classes in the context as well.- Specified by:
invalidateAndFireInvalidationEvents
in interfacePageClassLoaderContextManager
-
getRoot
Description copied from interface:PageClassLoaderContextManager
Returns the root context.- Specified by:
getRoot
in interfacePageClassLoaderContextManager
-
isMerging
Description copied from interface:PageClassLoaderContextManager
Returns whether contexts are being merged.- Specified by:
isMerging
in interfacePageClassLoaderContextManager
-
clear
Description copied from interface:PageClassLoaderContextManager
Clears any state held by this manager.- Specified by:
clear
in interfacePageClassLoaderContextManager
-
getClassInstance
Description copied from interface:PageClassLoaderContextManager
Returns the Class instance appropriate for a given component given a page name.- Specified by:
getClassInstance
in interfacePageClassLoaderContextManager
- Parameters:
clasz
- the class instance.pageName
- the page name.- Returns:
- a Class instance.
-
preload
Description copied from interface:PageClassLoaderContextManager
Preloads all data, first by collecting dependency data for all existing pages and the components, mixins and superclasses they use, then creating the page classloader contexts.- Specified by:
preload
in interfacePageClassLoaderContextManager
-
preloadContexts
Description copied from interface:PageClassLoaderContextManager
Preloads the page classloader contexts.- Specified by:
preloadContexts
in interfacePageClassLoaderContextManager
-