Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(143)

Issue 217110: Introduce ProxyUriManager (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 10 months ago by johnfargo
Modified:
15 years, 10 months ago
Reviewers:
zhoresh, shindig.remailer
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

Description

Introduces interface ProxytUriManager, to be used in the content proxy. Like other UriManager classes, it provides a well-encapsulated API between URI generation and consumption. DefaultProxyUriManager is provided as a default implementation of same. It provides a base implementation of ConcatUriManager that is conceptually consistent with all the other UriManager implementations provided. In particular: * Defines its own ContainerConfig "gadgets.uri.proxy" namespace with "host" and "path" values used for Host: and path assignment, respectively. * Provides a symmetric makeUri/validateUri pair * Provides a Versioner interface, in this case supporting batching, for versioning URLs or batches of same. No default Versioner implementation is provided in this CL. Neither the interface nor implementation are used in this CL, as the intent is to keep CLs as small as possible. A follow-up CL will change ProxyServlet to use the new interface, along with attendant rewriter changes.

Patch Set 1 #

Total comments: 5

Patch Set 2 : (also)Improving symmetry of make/validate APIs. Ridding API of Gadget context object. Other updates. #

Patch Set 3 : Symmetric APIs. Some unused params, at the benefit of fewer class types. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+629 lines, -0 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java View 1 2 1 chunk +235 lines, -0 lines 3 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/ProxyUriManager.java View 1 2 1 chunk +93 lines, -0 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManagerTest.java View 1 2 1 chunk +301 lines, -0 lines 1 comment Download

Messages

Total messages: 7
johnfargo
15 years, 10 months ago (2010-02-24 01:22:08 UTC) #1
zhoresh
Here are few comments. I still think that both the manager and the versioner don't ...
15 years, 10 months ago (2010-02-25 00:45:07 UTC) #2
johnfargo
Thanks as always. In addition to the comments below, I'm rejiggering the makeProxyUri context object ...
15 years, 10 months ago (2010-02-26 22:41:12 UTC) #3
johnfargo
(also)Improving symmetry of make/validate APIs. Ridding API of Gadget context object. Other updates.
15 years, 10 months ago (2010-02-27 00:25:51 UTC) #4
johnfargo
Symmetric APIs. Some unused params, at the benefit of fewer class types.
15 years, 10 months ago (2010-03-02 01:14:08 UTC) #5
zhoresh
LGTM I see common code in the manager and the concat manager. I think you ...
15 years, 10 months ago (2010-03-02 17:00:56 UTC) #6
johnfargo
15 years, 10 months ago (2010-03-03 19:08:18 UTC) #7
Committing this CL; cleanup soonish.

On Tue, Mar 2, 2010 at 9:00 AM, <zhoresh@gmail.com> wrote:

> LGTM
> I see common code in the manager and the concat manager.
> I think you can create a base manager for that code.
>
>
>
> http://codereview.appspot.com/217110/diff/3009/3010
>
> File
>
>
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java
> (right):
>
> http://codereview.appspot.com/217110/diff/3009/3010#newcode50
>
>
>
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java:50:
> *
>
> http://www.example.com/gadgets/proxy/refresh=1&.../http://www.foo.com/img.gif
> Add the start and end section markers in the example
>

Added.


>
> http://codereview.appspot.com/217110/diff/3009/3010#newcode120
>
>
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java:120:
> }
> Maybe put common code in basic manager: getBaseUriBuilder()
>

Excellent idea; will do in cleanup.


>
> http://codereview.appspot.com/217110/diff/3009/3010#newcode227
>
>
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java:227:
> private String getReqConfig(String container, String key) {
> This seems like a repeated code, maybe create a base uri manager.
>

Same.


>
> http://codereview.appspot.com/217110/diff/3009/3012
>
> File
>
>
java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManagerTest.java
> (right):
>
> http://codereview.appspot.com/217110/diff/3009/3012#newcode79
>
>
java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManagerTest.java:79:
> String path = "/proxy/" + DefaultProxyUriManager.CHAINED_PARAMS_TOKEN +
> "/path";
> Test also the case that CHAINED_PARAM_TOKEN is at the end of the path.


Provided @line86 and following.


>
>
> http://codereview.appspot.com/217110/show
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b