public class RandomHandler
A handler that generates random data.
| Modifiers | Name | Description |
|---|---|---|
static class |
RandomHandler.RandomEntity |
An entity that generates random data. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
handle(HttpRequest request, HttpResponse response, HttpContext context)Handles a request by generating random data. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Handles a request by generating random data. The length of the response can be specified in the request URI as a number after the last /. For example /random/whatever/20 will generate 20 random bytes in the printable ASCII range. If the request URI ends with /, a random number of random bytes is generated, but at least one.
request - the requestresponse - the responsecontext - the context