Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify HttpRequestTemplate and HttpResourceGroup to be DI friendly #138

Merged
merged 27 commits into from
Jul 29, 2014
Merged

Modify HttpRequestTemplate and HttpResourceGroup to be DI friendly #138

merged 27 commits into from
Jul 29, 2014

Conversation

elandau
Copy link
Contributor

@elandau elandau commented Jul 17, 2014

To enable ribbon in Guice just add RibbonModule() when creating the injector (either via Guice or Governator). Alternatively one can override the bindings for HttpResourceGroupFactory and HttpRequestTemplateFactory to override HttpResourceGroup and HttpRequestTemplate.

@cloudbees-pull-request-builder

ribbon-pull-requests #137 FAILURE
Looks like there's a problem with this pull request

@allenxwang
Copy link

@elandau Thanks for the DI work. I am wondering if the HttpRequestTemplateFactory is necessary. It seems to me that being able to inject HttpResourceGroupFactory will satisfy our use case since it can further control the behavior of creating HttpRequestTemplate.

@cloudbees-pull-request-builder

ribbon-pull-requests #141 FAILURE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

ribbon-pull-requests #142 FAILURE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

ribbon-pull-requests #143 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

ribbon-pull-requests #144 SUCCESS
This pull request looks good

@@ -125,7 +125,7 @@ public boolean runExample() {
}
}
);
return resultObservable.materialize().toBlocking().last();
return resultObservable.materialize().toBlockingObservable().last();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert this change? toBlockingObservable() is deprecated in 0.19.

Allen Wang and others added 2 commits July 22, 2014 18:16
…RequestTemplateFactory. Move ClientConfigFactory to core. Revert the changes to toBlockingObservable().
Some refactoring and renaming
@cloudbees-pull-request-builder

ribbon-pull-requests #145 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

ribbon-pull-requests #146 SUCCESS
This pull request looks good

Modify RxMovieClientTestBase to use ephemeral ports instead of Random
ports
@cloudbees-pull-request-builder

ribbon-pull-requests #147 FAILURE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

ribbon-pull-requests #149 FAILURE
Looks like there's a problem with this pull request

@allenxwang
Copy link

Will send a PR to fix the test not to rely on external host for redirecting.

Allen Wang and others added 2 commits July 24, 2014 17:56
@cloudbees-pull-request-builder

ribbon-pull-requests #150 SUCCESS
This pull request looks good

}

@Override
public <T> T from(Class<T> classType, HttpResourceGroup resourceGroup) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this method? It does not use any object attributes, and is equivalent to calling Ribbon.from directly.

Allen Wang and others added 4 commits July 28, 2014 16:12
…for future extension. Removed APIs to create proxy from ResourceGroup.
Make RibbonResourceFactory and RibbonTransportFactory abstract class for future extension. Removed APIs to create proxy from ResourceGroup.
@cloudbees-pull-request-builder

ribbon-pull-requests #151 FAILURE
Looks like there's a problem with this pull request

Allen Wang and others added 2 commits July 29, 2014 09:14
@cloudbees-pull-request-builder

ribbon-pull-requests #152 SUCCESS
This pull request looks good

allenxwang pushed a commit that referenced this pull request Jul 29, 2014
Modify HttpRequestTemplate and HttpResourceGroup to be DI friendly
@allenxwang allenxwang merged commit 27886d8 into Netflix:master Jul 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants