public class FakeHandler extends AbstractTestbedHandler
Modifier and Type | Class and Description |
---|---|
static class |
FakeHandler.Mode
Create links to hosts generated from a pool of numHosts/numPages random
names.
|
debug
Constructor and Description |
---|
FakeHandler(FakeHandler.Mode hostMode,
FakeHandler.Mode pageMode,
int numInternalLinks,
int numExternalLinks,
int numHosts,
int numPages)
Create fake pages.
|
Modifier and Type | Method and Description |
---|---|
void |
handle(org.mortbay.jetty.Request req,
javax.servlet.http.HttpServletResponse res,
String target,
int dispatch) |
addMyHeader, handle
destroy, doStart, doStop, getServer, setServer, toString
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public FakeHandler(FakeHandler.Mode hostMode, FakeHandler.Mode pageMode, int numInternalLinks, int numExternalLinks, int numHosts, int numPages)
hostMode
- if UNIQUE then each external outlink will use a unique host name.
If RANDOM then each outlink will use a host name allocated from
pool of numHosts.pageMode
- if UNIQUE then each internal outlinks will use a unique page name.
if RANDOM then each outlink will use a page name allocated from
pool of numPages.numInternalLinks
- numExternalLinks
- numHosts
- numPages
- public void handle(org.mortbay.jetty.Request req, javax.servlet.http.HttpServletResponse res, String target, int dispatch) throws IOException, javax.servlet.ServletException
handle
in class AbstractTestbedHandler
IOException
javax.servlet.ServletException
Copyright © 2015 The Apache Software Foundation