Class PortalWarmup

java.lang.Object
org.exoplatform.portal.application.PortalWarmup
All Implemented Interfaces:
Runnable

public class PortalWarmup extends Object implements Runnable
Once the server has started, compiles the portal's templates, then requests the login page once, anonymously, so that the first user's page waits for neither.
  • Field Details

    • ENABLED_PROPERTY

      public static final String ENABLED_PROPERTY
      false: neither the templates' compilation nor the request runs.
      See Also:
    • URL_PROPERTY

      public static final String URL_PROPERTY
      The URL of the warm-up request; empty: the login page on the loopback.
      See Also:
  • Method Details

    • start

      public static Thread start(org.exoplatform.container.ExoContainer container, PortalApplication application)
      Starts the warm-up thread, unless in developer mode or disabled by ENABLED_PROPERTY.
      Parameters:
      container - the portal container
      application - the portal application, whose pages render the templates the warm-up compiles
      Returns:
      the started thread, else null
    • run

      public void run()
      Specified by:
      run in interface Runnable