}
public boolean process(final SimpleRequest request, final SimpleResponse response)
throws IOException
{
RequestLine reqline = request.getRequestLine();
HttpVersion ver = reqline.getHttpVersion();
if (reqline.getUri().equals("/oldlocation/")) {
response.setStatusLine(ver, this.statuscode);
response.addHeader(new Header("Location",
"http://" + this.host + ":" + this.port + "/newlocation/"));
response.addHeader(new Header("Connection", "close"));
} else if (reqline.getUri().equals("/newlocation/")) {
response.setStatusLine(ver, HttpStatus.SC_OK);
response.setBodyString("Successful redirect");
} else {
response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
}