forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reintroduce org.springframework.http.client.reactive.ReactorResourceF…
…actory This commit reintroduces a deprecated ReactorResourceFactory in org.springframework.http.client.reactive package that extends the one in org.springframework.http.client package to avoid an API breaking change and to provide a smoother upgrade experience. Closes spring-projectsgh-31399
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...ng-web/src/main/java/org/springframework/http/client/reactive/ReactorResourceFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2002-2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.http.client.reactive; | ||
|
||
import reactor.netty.resources.ConnectionProvider; | ||
import reactor.netty.resources.LoopResources; | ||
|
||
import org.springframework.beans.factory.DisposableBean; | ||
import org.springframework.beans.factory.InitializingBean; | ||
import org.springframework.context.Lifecycle; | ||
|
||
/** | ||
* Factory to manage Reactor Netty resources, i.e. {@link LoopResources} for | ||
* event loop threads, and {@link ConnectionProvider} for the connection pool, | ||
* within the lifecycle of a Spring {@code ApplicationContext}. | ||
* | ||
* <p>This factory implements {@link InitializingBean}, {@link DisposableBean} | ||
* and {@link Lifecycle} and is expected typically to be declared as a | ||
* Spring-managed bean. | ||
* | ||
* <p>Notice that after a {@link Lifecycle} stop/restart, new instances of | ||
* the configured {@link LoopResources} and {@link ConnectionProvider} are | ||
* created, so any references to those should be updated. | ||
* | ||
* @author Rossen Stoyanchev | ||
* @author Brian Clozel | ||
* @author Sebastien Deleuze | ||
* @since 5.1 | ||
* @deprecated since 6.1 due to a package change; use {@link org.springframework.http.client.ReactorResourceFactory} instead. | ||
*/ | ||
@Deprecated(since = "6.1") | ||
public class ReactorResourceFactory extends org.springframework.http.client.ReactorResourceFactory { | ||
} |