com.continuuity.http
Interface URLRewriter
public interface URLRewriter
Re-writes URL of an incoming request before any handlers or their hooks are called.
This can be used to map an incoming URL to an URL that a handler understands. The re-writer overwrites the incoming
URL with the new value.
The re-writer can also send response to the clients, eg. redirect header,
and then stop further request processing.
|
Method Summary |
boolean |
rewrite(org.jboss.netty.handler.codec.http.HttpRequest request,
HttpResponder responder)
Implement this to rewrite URL of an incoming request. |
rewrite
boolean rewrite(org.jboss.netty.handler.codec.http.HttpRequest request,
HttpResponder responder)
- Implement this to rewrite URL of an incoming request. The re-written URL needs to be updated back in
request using HttpRequest.setUri(String).
- Parameters:
request - Incoming HTTP request.responder - Used to send response to clients.
- Returns:
- true if request processing should continue, false otherwise.
Copyright 2013 Continuuity, Inc. Licensed under the Apache License, Version 2.0