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

ConnectionFactory-level filters can not migrate to new API of #1956 #2089

Merged

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

In #1956 StreamingHttpRequester defines a new method
request(StreamingHttpRequest). AbstractStreamingHttpConnection only
implements the deprecated method that also takes an
HttpExecutionStrategy. Users who apply a filter through
ConnectionFactory see UnsupportedOperationException. Also, if they
have 2+ filters applied through ConnectionFactory, they can not mix
deprecated and new API.

Modifications:

  • Implement
    AbstractStreamingHttpConnection#request(StreamingHttpRequest);
  • Enhance NewToDeprecatedFilter to be ConnectionFactoryFilter too;
  • Apply NewToDeprecatedFilter when users invoke
    appendConnectionFactoryFilter;
  • Test appendConnectionFactoryFilter in MixedFiltersTest;

Result:

Users who apply request/response filters through ConnectionFactory
can migrate from deprecated to new request(StreamingHttpRequest) API.



Motivation:

In apple#1956 `StreamingHttpRequester` defines a new method
`request(StreamingHttpRequest)`. `AbstractStreamingHttpConnection` only
implements the deprecated method that also takes an
`HttpExecutionStrategy`. Users who apply a filter through
`ConnectionFactory` see `UnsupportedOperationException`. Also, if they
have 2+ filters applied through `ConnectionFactory`, they can not mix
deprecated and new API.

Modifications:

- Implement
`AbstractStreamingHttpConnection#request(StreamingHttpRequest)`;
- Enhance `NewToDeprecatedFilter` to be `ConnectionFactoryFilter` too;
- Apply `NewToDeprecatedFilter` when users invoke
`appendConnectionFactoryFilter`;
- Test `appendConnectionFactoryFilter` in `MixedFiltersTest`;

Result:

Users who apply request/response filters through `ConnectionFactory`
can migrate from deprecated to new `request(StreamingHttpRequest)` API.
@idelpivnitskiy idelpivnitskiy merged commit ccbe7f9 into apple:0.41 Feb 18, 2022
@idelpivnitskiy idelpivnitskiy deleted the AbstractStreamingHttpConnection branch February 18, 2022 18:14
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.

2 participants