Interface PageClassLoaderContextManager
- All Known Implementing Classes:
PageClassLoaderContextManagerImpl
public interface PageClassLoaderContextManager
Service that creates PageClassLoaderContext instances (except the root one)
when a class in a controlled page is first used in the Tapestry page pool. Existing
contexts may be reused for a given class, specially when in production mode.
- Since:
- 5.8.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears any state held by this manager.voidRemoves 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.voidinitialize(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.voidInvalidates page classloader contexts and invalidates the classes in the context as well.voidInvalidates the "unknown" page classloader context context.booleanReturns 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.voidPreloads the page classloader contexts.
-
Method Details
-
get
Processes a class, given its class name and the root context.- Parameters:
className- the class fully qualified name. ClassLoader} and returns a new PlasticProxyFactory.- Returns:
- the
PageClassLoaderContextassociated with that class.
-
invalidate
Invalidates page classloader contexts and returns a set containing the names of all classes that should be invalidated. -
invalidateAndFireInvalidationEvents
Invalidates page classloader contexts and invalidates the classes in the context as well. -
getRoot
Returns the root context. -
clear
void clear()Clears any state held by this manager. -
isMerging
boolean isMerging()Returns whether contexts are being merged. -
clear
Removes one specific class from this manager, invalidating the context where it is. -
initialize
void initialize(PageClassLoaderContext root, Function<ClassLoader, PlasticProxyFactory> plasticProxyFactoryProvider) 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. -
getClassInstance
Returns the Class instance appropriate for a given component given a page name.- Parameters:
clasz- the class instance.pageName- the page name.- Returns:
- a Class instance.
-
invalidateUnknownContext
void invalidateUnknownContext()Invalidates the "unknown" page classloader context context. -
preload
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. -
preloadContexts
void preloadContexts()Preloads the page classloader contexts.- Since:
- 5.8.7
-