org.apache.shindig.gadgets.servlet
Class ProxyHandler
java.lang.Object
org.apache.shindig.gadgets.servlet.ProxyHandler
public class ProxyHandler
- extends Object
Handles open proxy requests.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
remapInternalServerError
protected final boolean remapInternalServerError
ProxyHandler
@Inject
public ProxyHandler(RequestPipeline requestPipeline,
ResponseRewriterRegistry contentRewriterRegistry,
Boolean remapInternalServerError)
fetch
public HttpResponse fetch(ProxyUriManager.ProxyUri proxyUri)
throws IOException,
GadgetException
- Throws:
IOException
GadgetException
setResponseContentHeaders
protected void setResponseContentHeaders(HttpResponseBuilder response,
HttpResponse results)
isRecoverable
public boolean isRecoverable(HttpResponse results)
- Returns true in case the error encountered while rewriting the content
is recoverable. The rationale behind it is that errors should be thrown
only in case of serious grave errors (defined to be un recoverable).
It should always be preferred to handle errors and return the original
content at least.
- Parameters:
results - The result of rewriting.
- Returns:
- True if the error is recoverable, false otherwise.
Copyright © 2007-2012. All Rights Reserved.