RESTEASY-2292 JAX-RS client should support redirect / Jersey分析(一)

参考并分析jersey里面的redirect实现。

RedirectTest是分服务器测试的

$ find . | grep FollowRedirectsTest  
./connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/FollowRedirectsTest.java
./connectors/apache-connector/src/test/java/org/glassfish/jersey/apache/connector/FollowRedirectsTest.java
./connectors/jetty-connector/src/test/java/org/glassfish/jersey/jetty/connector/FollowRedirectsTest.java
./tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/FollowRedirectsTest.java
./test-framework/providers/inmemory/src/test/java/org/glassfish/jersey/test/inmemory/internal/FollowRedirectsTest.java
$ 

$ find . | grep ClientProperties
./connectors/apache-connector/target/classes/org/glassfish/jersey/apache/connector/ApacheClientProperties.class
./connectors/apache-connector/src/main/java/org/glassfish/jersey/apache/connector/ApacheClientProperties.java
./connectors/jetty-connector/target/classes/org/glassfish/jersey/jetty/connector/JettyClientProperties.class
./connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyClientProperties.java
./core-client/target/classes/org/glassfish/jersey/client/ClientProperties.class
./core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java
./bundles/jaxrs-ri/target/classes/org/glassfish/jersey/client/ClientProperties.class
./bundles/jaxrs-ri/target/unpacked-src/main/java/org/glassfish/jersey/client/ClientProperties.java
$

InMemoryTestContainer

Container的构建过程:

DeploymentContext

InMemoryConnector的tryFollowRedirects()方法

My Github Page: https://github.com/liweinan

Powered by Jekyll and Theme by solid

If you have any question want to ask or find bugs regarding with my blog posts, please report it here:
https://github.com/liweinan/liweinan.github.io/issues