org.apache.shindig.gadgets.uri
Class DefaultAccelUriManager

java.lang.Object
  extended by org.apache.shindig.gadgets.uri.DefaultAccelUriManager
All Implemented Interfaces:
AccelUriManager

public class DefaultAccelUriManager
extends Object
implements AccelUriManager

Default UriManager for Accel servlet. TODO: Add support for multiple accel hosts.

Since:
2.0.0

Field Summary
 
Fields inherited from interface org.apache.shindig.gadgets.uri.AccelUriManager
CONTAINER, PROXY_HOST_PARAM, PROXY_PATH_PARAM
 
Constructor Summary
DefaultAccelUriManager(ContainerConfig config, ProxyUriManager proxyUriManager)
           
 
Method Summary
protected  boolean looksLikeAccelUri(Uri requestUri)
          Is the given uri looks like a valid accel uri.
 Uri parseAndNormalize(HttpRequest httpRequest)
          Parses and normalizes the given request uri to be proxied through accel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAccelUriManager

@Inject
public DefaultAccelUriManager(ContainerConfig config,
                                     ProxyUriManager proxyUriManager)
Method Detail

parseAndNormalize

public Uri parseAndNormalize(HttpRequest httpRequest)
                      throws GadgetException
Description copied from interface: AccelUriManager
Parses and normalizes the given request uri to be proxied through accel.

Specified by:
parseAndNormalize in interface AccelUriManager
Parameters:
httpRequest - The http request.
Returns:
Normalized uri which is proxied through accel.
Throws:
GadgetException - In case of errors.

looksLikeAccelUri

protected boolean looksLikeAccelUri(Uri requestUri)
Is the given uri looks like a valid accel uri. If not, it should definitely be normalized.

Parameters:
requestUri - The uri to check.
Returns:
True in case the given uri was possibly generated by accel, false otherwise.


Copyright © 2007-2012. All Rights Reserved.