Class RenderPerformanceListener

  • All Implemented Interfaces:
    org.apache.wicket.application.IComponentInstantiationListener

    public class RenderPerformanceListener
    extends java.lang.Object
    implements org.apache.wicket.application.IComponentInstantiationListener
    A listener that adds a special Behavior that measures the time needed by a component to render itself. MarkupContainer's render includes the time for rendering its children so the time accumulates.

    To enable this listener use the following in YourApplication.init():

     getComponentInstantiationListeners().add(new RenderPerformanceListener());
     

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean accepts​(org.apache.wicket.Component component)
      Filters which components' render performance should be measured.
      void onInstantiation​(org.apache.wicket.Component component)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RenderPerformanceListener

        public RenderPerformanceListener()
    • Method Detail

      • onInstantiation

        public void onInstantiation​(org.apache.wicket.Component component)
        Specified by:
        onInstantiation in interface org.apache.wicket.application.IComponentInstantiationListener
      • accepts

        protected boolean accepts​(org.apache.wicket.Component component)
        Filters which components' render performance should be measured.
        Parameters:
        component - the component that is instantiated
        Returns:
        true if render time should be measured the for this component, false - otherwise