| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
HttpRequest.addAllHeaders(Map<String,? extends List<String>> headers)
Adds all headers in the provided map to the request.
|
HttpRequest |
HttpRequest.addHeader(String name,
String value)
Add a single header to the request.
|
HttpRequest |
HttpRequest.addHeaders(Map<String,String> headers)
Adds an entire map of headers to the request.
|
HttpRequest |
MultipleResourceHttpFetcher.RequestContext.getHttpReq() |
HttpRequest |
HttpRequest.setAuthType(AuthType authType) |
HttpRequest |
HttpRequest.setCacheTtl(int cacheTtl) |
HttpRequest |
HttpRequest.setContainer(String container) |
HttpRequest |
HttpRequest.setFollowRedirects(boolean followRedirects) |
HttpRequest |
HttpRequest.setGadget(Uri gadget) |
HttpRequest |
HttpRequest.setHeader(String name,
String value)
Sets a single header value, overwriting any previously set headers with the same name.
|
HttpRequest |
HttpRequest.setIgnoreCache(boolean ignoreCache) |
HttpRequest |
HttpRequest.setInternalRequest(boolean internalRequest)
An internal request is one created by the server to satisfy global server requirements.
|
HttpRequest |
HttpRequest.setMethod(String method) |
HttpRequest |
HttpRequest.setOAuth2Arguments(OAuth2Arguments oauth2Arguments) |
HttpRequest |
HttpRequest.setOAuthArguments(OAuthArguments oauthArguments) |
HttpRequest |
HttpRequest.setPostBody(byte[] postBody)
Assigns the specified body to the request, copying all input bytes.
|
HttpRequest |
HttpRequest.setPostBody(InputStream is)
Fills in the request body from an InputStream.
|
HttpRequest |
HttpRequest.setRewriteMimeType(String rewriteMimeType) |
HttpRequest |
HttpRequest.setSecurityToken(SecurityToken securityToken)
Assign the security token to use for making any form of authenticated request.
|
HttpRequest |
HttpRequest.setUri(Uri uri) |
| Modifier and Type | Method and Description |
|---|---|
HttpResponse |
HttpCache.addResponse(HttpRequest request,
HttpResponse response)
Add a request/response pair to the cache.
|
HttpResponse |
AbstractHttpCache.addResponse(HttpRequest request,
HttpResponse response) |
protected HttpResponse |
DefaultRequestPipeline.cacheFetchedResponse(HttpRequest request,
HttpResponse fetchedResponse)
Cache the HttpResponse object before being returned to caller.
|
protected HttpResponse |
DefaultRequestPipeline.checkCachedResponse(HttpRequest request)
Check the HttpRequest object has already allow caching and if do try to get it from cache.
|
String |
HttpCache.createKey(HttpRequest request)
Create a string representation of the cache key.
|
String |
AbstractHttpCache.createKey(HttpRequest request)
Produce a key from the given request.
|
HttpResponse |
RequestPipeline.execute(HttpRequest request)
Execute the given request.
|
HttpResponse |
DefaultRequestPipeline.execute(HttpRequest request) |
HttpResponse |
HttpFetcher.fetch(HttpRequest request)
Fetch HTTP content.
|
HttpResponse |
BasicHttpFetcher.fetch(HttpRequest request) |
protected HttpResponse |
DefaultRequestPipeline.fetchResponse(HttpRequest request)
Fetch the response from the network using the right fetcher
Override this if you need to extend the current behavior of supported auth type.
|
protected HttpResponse |
DefaultRequestPipeline.fixFetchedResponse(HttpRequest request,
HttpResponse fetchedResponse,
HttpResponse invalidatedResponse,
HttpResponse staleResponse)
Attempt to "fix" the response by checking its validity and adding additional metadata
Override this if you need to add more processing to the HttpResponse before being cached and
returned.
|
protected static String |
AbstractHttpCache.getAppUrl(HttpRequest request) |
protected static String |
AbstractHttpCache.getInstanceId(HttpRequest request) |
protected static String |
AbstractHttpCache.getOwnerId(HttpRequest request) |
HttpResponse |
HttpCache.getResponse(HttpRequest request) |
HttpResponse |
AbstractHttpCache.getResponse(HttpRequest request) |
protected static String |
AbstractHttpCache.getServiceName(HttpRequest request) |
protected static String |
AbstractHttpCache.getTokenName(HttpRequest request) |
protected static String |
AbstractHttpCache.getTokenOwner(HttpRequest request) |
protected static String |
AbstractHttpCache.getViewerId(HttpRequest request) |
protected boolean |
AbstractHttpCache.isCacheable(HttpRequest request) |
protected boolean |
AbstractHttpCache.isCacheable(HttpRequest request,
HttpResponse response,
boolean allowStrictNoCacheResponses) |
boolean |
NoOpInvalidationService.isValid(HttpRequest request,
HttpResponse response) |
boolean |
InvalidationService.isValid(HttpRequest request,
HttpResponse response)
Is the specified HttpResponse still valid.
|
boolean |
DefaultInvalidationService.isValid(HttpRequest request,
HttpResponse response) |
HttpResponse |
NoOpInvalidationService.markResponse(HttpRequest request,
HttpResponse response) |
HttpResponse |
InvalidationService.markResponse(HttpRequest request,
HttpResponse response)
Mark the HttpResponse prior to caching it so that subsequent calls to isValid can detect
if it has been invalidated.
|
HttpResponse |
DefaultInvalidationService.markResponse(HttpRequest request,
HttpResponse response) |
protected void |
DefaultRequestPipeline.normalizeProtocol(HttpRequest request)
Normalizing the HttpRequest object to verify the validity of the request.
|
HttpResponse |
HttpCache.removeResponse(HttpRequest key) |
HttpResponse |
AbstractHttpCache.removeResponse(HttpRequest request) |
protected void |
BasicHttpFetcher.slowResponseWarning(HttpRequest request,
long started,
long finished)
Called when a request takes too long.
|
| Modifier and Type | Method and Description |
|---|---|
List<Pair<Uri,FutureTask<MultipleResourceHttpFetcher.RequestContext>>> |
MultipleResourceHttpFetcher.fetchAll(List<HttpRequest> requests)
Issue parallel requests to all resources that are needed.
|
Map<Uri,FutureTask<MultipleResourceHttpFetcher.RequestContext>> |
MultipleResourceHttpFetcher.fetchUnique(List<HttpRequest> requests)
Issue parallel requests to all the resources that are needed ignoring
duplicates.
|
| Constructor and Description |
|---|
HttpRequest(HttpRequest request)
Clone an existing HttpRequest.
|
MultipleResourceHttpFetcher.RequestContext(HttpRequest httpReq,
HttpResponse httpResp,
GadgetException ge) |
| Modifier and Type | Field and Description |
|---|---|
protected HttpRequest |
OAuthRequest.realRequest
The request the client really wants to make.
|
| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
OAuthRequest.sanitizeAndSign(HttpRequest base,
List<net.oauth.OAuth.Parameter> params,
boolean tokenEndpoint,
boolean addBodyHash)
Start with an HttpRequest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
OAuthResponseParams.addRequestTrace(HttpRequest request,
HttpResponse response)
Add a request/response pair to our trace of actions associated with this request.
|
HttpResponse |
OAuthRequest.fetch(HttpRequest request)
OAuth authenticated fetch.
|
String |
OAuthCallbackGenerator.generateCallback(OAuthFetcherConfig fetcherConfig,
String baseCallback,
HttpRequest request,
OAuthResponseParams responseParams) |
String |
GadgetOAuthCallbackGenerator.generateCallback(OAuthFetcherConfig fetcherConfig,
String baseCallback,
HttpRequest request,
OAuthResponseParams responseParams) |
HttpRequest |
OAuthRequest.sanitizeAndSign(HttpRequest base,
List<net.oauth.OAuth.Parameter> params,
boolean tokenEndpoint,
boolean addBodyHash)
Start with an HttpRequest.
|
| Constructor and Description |
|---|
OAuthResponseParams(SecurityToken securityToken,
HttpRequest originalRequest,
BlobCrypter stateCrypter)
Create response parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
OAuth2ResponseParams.addRequestTrace(HttpRequest request,
HttpResponse response)
Add a request/response pair to our trace of actions associated with this
request.
|
HttpResponse |
OAuth2Request.fetch(HttpRequest request)
OAuth 2.0 authenticated request
|
HttpResponse |
BasicOAuth2Request.fetch(HttpRequest request) |
Map<String,String> |
OAuth2RequestParameterGenerator.generateParams(HttpRequest request)
Generates additional parameters that are added to the request sent to the authorization server
|
Map<String,String> |
BasicOAuth2RequestParameterGenerator.generateParams(HttpRequest request) |
| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
GrantRequestHandler.getAuthorizationRequest(OAuth2Accessor accessor,
String completeAuthorizationUrl)
If
GrantRequestHandler.isRedirectRequired() is false the system will executes this
request. |
HttpRequest |
CodeGrantTypeHandler.getAuthorizationRequest(OAuth2Accessor accessor,
String completeAuthorizationUrl) |
HttpRequest |
ClientCredentialsGrantTypeHandler.getAuthorizationRequest(OAuth2Accessor accessor,
String completeAuthorizationUrl) |
| Modifier and Type | Method and Description |
|---|---|
OAuth2HandlerError |
StandardAuthenticationHandler.addOAuth2Authentication(HttpRequest request,
OAuth2Accessor accessor) |
OAuth2HandlerError |
ClientAuthenticationHandler.addOAuth2Authentication(HttpRequest request,
OAuth2Accessor accessor)
Handler implementation will modify request as necessary.
|
OAuth2HandlerError |
BasicAuthenticationHandler.addOAuth2Authentication(HttpRequest request,
OAuth2Accessor accessor) |
OAuth2HandlerError |
ResourceRequestHandler.addOAuth2Params(OAuth2Accessor accessor,
HttpRequest request)
Do the handler magic for the token type.
|
OAuth2HandlerError |
MacTokenHandler.addOAuth2Params(OAuth2Accessor accessor,
HttpRequest request) |
OAuth2HandlerError |
BearerTokenHandler.addOAuth2Params(OAuth2Accessor accessor,
HttpRequest request) |
| Modifier and Type | Method and Description |
|---|---|
static HttpRequest |
HttpPreloader.newHttpRequest(GadgetContext context,
RequestAuthenticationInfo authenticationInfo) |
| Modifier and Type | Method and Description |
|---|---|
protected HttpResponse |
PipelinedDataPreloader.executeSocialRequest(HttpRequest request)
Hook for executing a JSON RPC fetch for social data.
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpRequest |
ProxyRenderer.createPipelinedProxyRequest(Gadget gadget,
HttpRequest original)
Creates a proxy request by fetching pipelined data and adding it to an existing request.
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpRequest |
ProxyRenderer.createPipelinedProxyRequest(Gadget gadget,
HttpRequest original)
Creates a proxy request by fetching pipelined data and adding it to an existing request.
|
void |
SanitizingResponseRewriter.rewrite(HttpRequest request,
HttpResponseBuilder resp,
Gadget gadget) |
void |
CajaResponseRewriter.rewrite(HttpRequest req,
HttpResponseBuilder resp,
Gadget gadget) |
| Modifier and Type | Method and Description |
|---|---|
static HttpRequest |
ImageAttributeRewriter.ImageAttributeVisitor.buildHttpRequest(Gadget gadget,
Uri imgUri) |
protected HttpRequest |
CacheEnforcementVisitor.createNewHttpRequest(Gadget gadget,
String uriStr)
Constructs a new HttpRequest in the context of the gadget.
|
| Modifier and Type | Method and Description |
|---|---|
ContentRewriterFeature.Config |
ContentRewriterFeature.Factory.get(HttpRequest request) |
static String |
RewriterUtils.getMimeType(HttpRequest request,
HttpResponse original) |
static String |
RewriterUtils.getMimeType(HttpRequest request,
HttpResponseBuilder original) |
protected DomWalker.Visitor.VisitStatus |
CacheEnforcementVisitor.handleResponseInCache(HttpRequest request,
HttpResponse response)
The action to be performed if the response is in cache.
|
protected DomWalker.Visitor.VisitStatus |
CacheEnforcementVisitor.handleResponseNotInCache(HttpRequest request)
The action to be performed if the response is not in cache.
|
static boolean |
RewriterUtils.isCss(HttpRequest request,
HttpResponse original) |
static boolean |
RewriterUtils.isCss(HttpRequest request,
HttpResponseBuilder original) |
static boolean |
RewriterUtils.isHtml(HttpRequest request,
HttpResponse original) |
static boolean |
RewriterUtils.isHtml(HttpRequest request,
HttpResponseBuilder original) |
static boolean |
RewriterUtils.isJavascript(HttpRequest request,
HttpResponse original) |
static boolean |
RewriterUtils.isJavascript(HttpRequest request,
HttpResponseBuilder original) |
static Gadget |
DomWalker.makeGadget(HttpRequest request) |
void |
ResponseRewriter.rewrite(HttpRequest request,
HttpResponseBuilder response,
Gadget gadget)
Rewrites the response.
|
void |
DomWalker.Rewriter.rewrite(HttpRequest request,
HttpResponseBuilder builder,
Gadget gadget) |
void |
CssResponseRewriter.rewrite(HttpRequest request,
HttpResponseBuilder original,
Gadget gadget) |
void |
CaptureRewriter.rewrite(HttpRequest request,
HttpResponseBuilder response,
Gadget gadget) |
void |
BaseTagRemoverRewriter.rewrite(HttpRequest request,
HttpResponseBuilder response,
Gadget gadget) |
boolean |
OsTemplateXmlLoaderRewriter.rewrite(HttpRequest request,
HttpResponse original,
MutableContent content) |
HttpResponse |
ResponseRewriterRegistry.rewriteHttpResponse(HttpRequest req,
HttpResponse resp,
Gadget gadget)
Rewrites an
HttpResponse object with the given request as context,
using the registered rewriters. |
HttpResponse |
DefaultResponseRewriterRegistry.rewriteHttpResponse(HttpRequest req,
HttpResponse resp,
Gadget gadget)
Rewrites an
HttpResponse object with the given request as context,
using the registered rewriters. |
HttpResponse |
ContextAwareRegistry.rewriteHttpResponse(HttpRequest req,
HttpResponse resp,
Gadget gadget) |
protected void |
CacheEnforcementVisitor.triggerFetch(HttpRequest request)
Triggers a background fetch for a resource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
BasicImageRewriter.rewrite(HttpRequest request,
HttpResponseBuilder response,
Gadget gadget) |
| Modifier and Type | Method and Description |
|---|---|
protected HttpRequest |
AccelHandler.buildHttpRequest(HttpRequest httpRequest,
ProxyUriManager.ProxyUri uriToProxyOrRewrite)
Build an HttpRequest object encapsulating the request details as requested
by the user.
|
protected HttpRequest |
MakeRequestHandler.buildHttpRequest(javax.servlet.http.HttpServletRequest request)
Generate a remote content request based on the parameters sent from the client.
|
static HttpRequest |
ServletUtil.fromHttpServletRequest(javax.servlet.http.HttpServletRequest servletReq)
Returns an HttpRequest object encapsulating the servlet request.
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpRequest |
AccelHandler.buildHttpRequest(HttpRequest httpRequest,
ProxyUriManager.ProxyUri uriToProxyOrRewrite)
Build an HttpRequest object encapsulating the request details as requested
by the user.
|
HttpResponse |
AccelHandler.fetch(HttpRequest request) |
ProxyUriManager.ProxyUri |
AccelHandler.getProxyUri(HttpRequest httpRequest)
Returns the proxy uri encapsulating the request uri.
|
protected void |
MakeRequestHandler.setPostData(String container,
javax.servlet.http.HttpServletRequest request,
HttpRequest req)
Set http request post data according to servlet request.
|
static void |
ServletUtil.setXForwardedForHeader(HttpRequest inboundRequest,
HttpRequest req)
Sets standard forwarding headers on the proxied request.
|
static void |
ServletUtil.setXForwardedForHeader(javax.servlet.http.HttpServletRequest inboundRequest,
HttpRequest req) |
| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
ProxyUriManager.ProxyUri.makeHttpRequest(Uri targetUri) |
HttpRequest |
ProxyUriBase.makeHttpRequest(Uri targetUri) |
| Modifier and Type | Method and Description |
|---|---|
static void |
UriUtils.copyRequestData(HttpRequest origRequest,
HttpRequest req)
Copies the post data from HttpServletRequest object to HttpRequest object.
|
static void |
UriUtils.copyRequestHeaders(HttpRequest origRequest,
HttpRequest req,
UriUtils.DisallowedHeaders... disallowedRequestHeaders)
Copies headers from HttpServletRequest object to HttpRequest object.
|
static void |
UriUtils.maybeRewriteContentType(HttpRequest req,
HttpResponseBuilder response)
Rewrite the content type of the final http response if the request has the
rewrite-mime-type param.
|
Uri |
DefaultAccelUriManager.parseAndNormalize(HttpRequest httpRequest) |
Uri |
AccelUriManager.parseAndNormalize(HttpRequest httpRequest)
Parses and normalizes the given request uri to be proxied through accel.
|
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.