org.apache.wicket.examples
Class ServerHostNameAndTimeFilter

java.lang.Object
  extended by org.apache.wicket.examples.ServerHostNameAndTimeFilter
All Implemented Interfaces:
IResponseFilter

public class ServerHostNameAndTimeFilter
extends Object
implements IResponseFilter

Displays server host name (combination of name, ipaddress and unique id, which is either based) and time it took to handle the request in the browser's status bar like this: window.defaultStatus = 'Host: myhost/192.168.1.66/someid, handled in: 0.01s'

Author:
eelco hillenius

Constructor Summary
ServerHostNameAndTimeFilter()
          Construct, trying system property 'examples.hostname' for the server id or else current time milis.
ServerHostNameAndTimeFilter(String hostId)
          Construct with an id.
 
Method Summary
 AppendingStringBuffer filter(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

ServerHostNameAndTimeFilter

public ServerHostNameAndTimeFilter()
Construct, trying system property 'examples.hostname' for the server id or else current time milis.


ServerHostNameAndTimeFilter

public ServerHostNameAndTimeFilter(String hostId)
Construct with an id.

Parameters:
hostId - a unique id indentifying this server instance
Method Detail

filter

public AppendingStringBuffer filter(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)


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.