Add create shortcut to RSocketStrategies
Now that RSocketStrategies has default settings it makes sense to have a create() shortcut vs builder().build(). This commit also updates tests to take advantage of improvements in this and the previous two commits. See gh-23314
This commit is contained in:
@@ -114,14 +114,6 @@ public interface RSocketStrategies {
|
||||
*/
|
||||
ReactiveAdapterRegistry reactiveAdapterRegistry();
|
||||
|
||||
|
||||
/**
|
||||
* Return a builder to build a new {@code RSocketStrategies} instance.
|
||||
*/
|
||||
static Builder builder() {
|
||||
return new DefaultRSocketStrategies.DefaultRSocketStrategiesBuilder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a builder to create a new {@link RSocketStrategies} instance
|
||||
* replicated from the current instance.
|
||||
@@ -131,6 +123,24 @@ public interface RSocketStrategies {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create an {@code RSocketStrategies} instance with default settings.
|
||||
* Equivalent to {@code RSocketStrategies.builder().build()}.
|
||||
*/
|
||||
static RSocketStrategies create() {
|
||||
return new DefaultRSocketStrategies.DefaultRSocketStrategiesBuilder().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a builder to build a new {@code RSocketStrategies} instance.
|
||||
* The builder applies default settings, see individual builder methods for
|
||||
* details.
|
||||
*/
|
||||
static Builder builder() {
|
||||
return new DefaultRSocketStrategies.DefaultRSocketStrategiesBuilder();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The builder options for creating {@code RSocketStrategies}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user