public class AccelHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ResponseRewriterRegistry |
contentRewriterRegistry |
protected boolean |
remapInternalServerError |
protected RequestPipeline |
requestPipeline |
protected AccelUriManager |
uriManager |
| Constructor and Description |
|---|
AccelHandler(RequestPipeline requestPipeline,
ResponseRewriterRegistry contentRewriterRegistry,
AccelUriManager accelUriManager,
Boolean remapInternalServerError) |
| Modifier and Type | Method and Description |
|---|---|
protected HttpRequest |
buildHttpRequest(HttpRequest httpRequest,
ProxyUriManager.ProxyUri uriToProxyOrRewrite)
Build an HttpRequest object encapsulating the request details as requested
by the user.
|
HttpResponse |
fetch(HttpRequest request) |
ProxyUriManager.ProxyUri |
getProxyUri(HttpRequest httpRequest)
Returns the proxy uri encapsulating the request uri.
|
protected HttpResponse |
handleErrors(HttpResponse results)
Process errors when fetching uri using request pipeline and return the
error response to be returned to the user if any.
|
protected final RequestPipeline requestPipeline
protected final ResponseRewriterRegistry contentRewriterRegistry
protected final AccelUriManager uriManager
protected final boolean remapInternalServerError
@Inject public AccelHandler(RequestPipeline requestPipeline, ResponseRewriterRegistry contentRewriterRegistry, AccelUriManager accelUriManager, Boolean remapInternalServerError)
public HttpResponse fetch(HttpRequest request) throws IOException, GadgetException
IOExceptionGadgetExceptionpublic ProxyUriManager.ProxyUri getProxyUri(HttpRequest httpRequest) throws GadgetException
httpRequest - The http request.GadgetException - In case of errors.protected HttpRequest buildHttpRequest(HttpRequest httpRequest, ProxyUriManager.ProxyUri uriToProxyOrRewrite) throws GadgetException
httpRequest - The http request.uriToProxyOrRewrite - The parsed uri to proxy or rewrite through
accel servlet.GadgetException - In case the data could not be fetched.protected HttpResponse handleErrors(HttpResponse results)
results - The http response returned by request pipeline.Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.