Class ServerAndClientTimeFilter

  • All Implemented Interfaces:
    IResponseFilter

    public class ServerAndClientTimeFilter
    extends java.lang.Object
    implements IResponseFilter
    This is a filter that injects javascript code to the top head portion and after the body so that the time can me measured what the client parse time was for this page. It also reports the total server parse/response time in the client and logs the server response time and response size it took for a specific response in the server log. You can specify what the status text should be like this: ServerAndClientTimeFilter.statustext=My Application, Server parsetime: ${servertime}, Client parsetime: ${clienttime}

    Usage: in YourApplication.java:

     @Override
     public init()
     {
            super.init();
            getRequestCycleSettings().addResponseFilter(new ServerAndClientTimeFilter());
     }
     
    Author:
    jcompagner
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.wicket.util.string.AppendingStringBuffer filter​(org.apache.wicket.util.string.AppendingStringBuffer responseBuffer)
      Filters the response buffer and returns the filtered response that can be used in the next filter or returned to the real output itself.
      • Methods inherited from class java.lang.Object

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

      • ServerAndClientTimeFilter

        public ServerAndClientTimeFilter()
    • Method Detail

      • filter

        public org.apache.wicket.util.string.AppendingStringBuffer filter​(org.apache.wicket.util.string.AppendingStringBuffer responseBuffer)
        Description copied from interface: IResponseFilter
        Filters the response buffer and returns the filtered response that can be used in the next filter or returned to the real output itself. A filter may alter the response buffer and return the response buffer itself.
        Specified by:
        filter in interface IResponseFilter
        Parameters:
        responseBuffer - The response buffer to be filtered
        Returns:
        The changed buffer or the response buffer itself (changed or not)
        See Also:
        IResponseFilter.filter(AppendingStringBuffer)