Class PageClassLoaderContextManagerImpl
- java.lang.Object
-
- org.apache.tapestry5.services.pageload.PageClassLoaderContextManagerImpl
-
- All Implemented Interfaces:
PageClassLoaderContextManager
public class PageClassLoaderContextManagerImpl extends java.lang.Object implements PageClassLoaderContextManager
Default PageClassLoaderContextManager implementation.- Since:
- 5.8.3
-
-
Constructor Summary
Constructors Constructor Description PageClassLoaderContextManagerImpl(ComponentDependencyRegistry componentDependencyRegistry, ComponentClassResolver componentClassResolver, InternalComponentInvalidationEventHub invalidationHub, InvalidationEventHub componentClassesInvalidationEventHub, boolean productionMode, boolean multipleClassLoaders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears any state held by this manager.voidclear(java.lang.String className)Removes one specific class from this manager, invalidating the context where it is.PageClassLoaderContextget(java.lang.String className)Processes a class, given its class name and the root context.java.lang.Class<?>getClassInstance(java.lang.Class<?> clasz, java.lang.String pageName)Returns the Class instance appropriate for a given component given a page name.PageClassLoaderContextgetRoot()Returns the root context.voidinitialize(PageClassLoaderContext root, java.util.function.Function<java.lang.ClassLoader,PlasticProxyFactory> plasticProxyFactoryProvider)Initializes this service with the root context and a Plastic proxy factory provider.java.util.Set<java.lang.String>invalidate(PageClassLoaderContext... contexts)Invalidates page classloader contexts and returns a set containing the names of all classes that should be invalidated.voidinvalidateAndFireInvalidationEvents(PageClassLoaderContext... contexts)Invalidates page classloader contexts and invalidates the classes in the context as well.voidinvalidateUnknownContext()Invalidates the "unknown" page classloader context context.booleanisMerging()Returns whether contexts are being merged.voidpreload()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.voidpreloadContexts()Preloads the page classloader contexts.
-
-
-
Constructor Detail
-
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 Detail
-
invalidateUnknownContext
public void invalidateUnknownContext()
Description copied from interface:PageClassLoaderContextManagerInvalidates the "unknown" page classloader context context.- Specified by:
invalidateUnknownContextin interfacePageClassLoaderContextManager
-
initialize
public void initialize(PageClassLoaderContext root, java.util.function.Function<java.lang.ClassLoader,PlasticProxyFactory> plasticProxyFactoryProvider)
Description copied from interface:PageClassLoaderContextManagerInitializes 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:
initializein interfacePageClassLoaderContextManager
-
get
public PageClassLoaderContext get(java.lang.String className)
Description copied from interface:PageClassLoaderContextManagerProcesses a class, given its class name and the root context.- Specified by:
getin interfacePageClassLoaderContextManager- Parameters:
className- the class fully qualified name. ClassLoader} and returns a new PlasticProxyFactory.- Returns:
- the
PageClassLoaderContextassociated with that class.
-
clear
public void clear(java.lang.String className)
Description copied from interface:PageClassLoaderContextManagerRemoves one specific class from this manager, invalidating the context where it is.- Specified by:
clearin interfacePageClassLoaderContextManager
-
invalidate
public java.util.Set<java.lang.String> invalidate(PageClassLoaderContext... contexts)
Description copied from interface:PageClassLoaderContextManagerInvalidates page classloader contexts and returns a set containing the names of all classes that should be invalidated.- Specified by:
invalidatein interfacePageClassLoaderContextManager
-
invalidateAndFireInvalidationEvents
public void invalidateAndFireInvalidationEvents(PageClassLoaderContext... contexts)
Description copied from interface:PageClassLoaderContextManagerInvalidates page classloader contexts and invalidates the classes in the context as well.- Specified by:
invalidateAndFireInvalidationEventsin interfacePageClassLoaderContextManager
-
getRoot
public PageClassLoaderContext getRoot()
Description copied from interface:PageClassLoaderContextManagerReturns the root context.- Specified by:
getRootin interfacePageClassLoaderContextManager
-
isMerging
public boolean isMerging()
Description copied from interface:PageClassLoaderContextManagerReturns whether contexts are being merged.- Specified by:
isMergingin interfacePageClassLoaderContextManager
-
clear
public void clear()
Description copied from interface:PageClassLoaderContextManagerClears any state held by this manager.- Specified by:
clearin interfacePageClassLoaderContextManager
-
getClassInstance
public java.lang.Class<?> getClassInstance(java.lang.Class<?> clasz, java.lang.String pageName)
Description copied from interface:PageClassLoaderContextManagerReturns the Class instance appropriate for a given component given a page name.- Specified by:
getClassInstancein interfacePageClassLoaderContextManager- Parameters:
clasz- the class instance.pageName- the page name.- Returns:
- a Class instance.
-
preload
public void preload()
Description copied from interface:PageClassLoaderContextManagerPreloads 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:
preloadin interfacePageClassLoaderContextManager
-
preloadContexts
public void preloadContexts()
Description copied from interface:PageClassLoaderContextManagerPreloads the page classloader contexts.- Specified by:
preloadContextsin interfacePageClassLoaderContextManager
-
-