Interface PageClassLoaderContextManager

All Known Implementing Classes:
PageClassLoaderContextManagerImpl

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 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 PageClassLoaderContext associated 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

      void clear(String className)
      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

      Class<?> getClassInstance(Class<?> clasz, String pageName)
      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

      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

      Preloads the page classloader contexts.
      Since:
      5.8.7