public class ProxyHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
remapInternalServerError |
| Constructor and Description |
|---|
ProxyHandler(RequestPipeline requestPipeline,
ResponseRewriterRegistry contentRewriterRegistry,
Boolean remapInternalServerError,
GadgetAdminStore gadgetAdminStore,
int longLivedRefreshSec) |
| Modifier and Type | Method and Description |
|---|---|
HttpResponse |
fetch(ProxyUriManager.ProxyUri proxyUri) |
HttpResponse |
fetch(ProxyUriManager.ProxyUri proxyUri,
String postBody) |
boolean |
isRecoverable(HttpResponse results)
Returns true in case the error encountered while rewriting the content is recoverable.
|
protected void |
setResponseContentHeaders(HttpResponseBuilder response,
HttpResponse results) |
@Inject public ProxyHandler(RequestPipeline requestPipeline, ResponseRewriterRegistry contentRewriterRegistry, Boolean remapInternalServerError, GadgetAdminStore gadgetAdminStore, int longLivedRefreshSec)
public HttpResponse fetch(ProxyUriManager.ProxyUri proxyUri) throws IOException, GadgetException
IOExceptionGadgetExceptionpublic HttpResponse fetch(ProxyUriManager.ProxyUri proxyUri, String postBody) throws IOException, GadgetException
IOExceptionGadgetExceptionprotected void setResponseContentHeaders(HttpResponseBuilder response, HttpResponse results)
public boolean isRecoverable(HttpResponse results)
results - The result of rewriting.Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.