org.webbitserver.handler
Class DelayedHttpHandler

java.lang.Object
  extended by org.webbitserver.handler.DelayedHttpHandler
All Implemented Interfaces:
HttpHandler

public class DelayedHttpHandler
extends Object
implements HttpHandler

Wraps a standard HttpHandler, and will introduce an artificial delay. Useful for testing how things will behave when they are slow.


Constructor Summary
DelayedHttpHandler(Executor executor, long delayInMillis, HttpHandler handler)
           
 
Method Summary
 void handleHttpRequest(HttpRequest request, HttpResponse response, HttpControl control)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelayedHttpHandler

public DelayedHttpHandler(Executor executor,
                          long delayInMillis,
                          HttpHandler handler)
Method Detail

handleHttpRequest

public void handleHttpRequest(HttpRequest request,
                              HttpResponse response,
                              HttpControl control)
                       throws Exception
Specified by:
handleHttpRequest in interface HttpHandler
Throws:
Exception


Copyright © 2012. All Rights Reserved.