-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32224 from geoand/rr-config-mapping
Apply some housekeeping to RESTEasy Reactive
- Loading branch information
Showing
8 changed files
with
52 additions
and
48 deletions.
There are no files selected for viewing
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
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
32 changes: 17 additions & 15 deletions
32
...ime/src/main/java/io/quarkus/resteasy/reactive/common/runtime/ResteasyReactiveConfig.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 |
---|---|---|
@@ -1,59 +1,61 @@ | ||
package io.quarkus.resteasy.reactive.common.runtime; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.quarkus.runtime.configuration.MemorySize; | ||
import io.smallrye.common.annotation.Experimental; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
|
||
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED, name = "resteasy-reactive") | ||
public class ResteasyReactiveConfig { | ||
@ConfigMapping(prefix = "quarkus.resteasy-reactive") | ||
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) | ||
public interface ResteasyReactiveConfig { | ||
|
||
/** | ||
* The amount of memory that can be used to buffer input before switching to | ||
* blocking IO. | ||
*/ | ||
@ConfigItem(defaultValue = "10k") | ||
public MemorySize inputBufferSize; | ||
@WithDefault("10k") | ||
MemorySize inputBufferSize(); | ||
|
||
/** | ||
* The size of the output stream response buffer. If a response is larger than this and no content-length | ||
* is provided then the request will be chunked. | ||
* | ||
* Larger values may give slight performance increases for large responses, at the expense of more memory usage. | ||
*/ | ||
@ConfigItem(defaultValue = "8191") | ||
public int outputBufferSize; | ||
@WithDefault("8191") | ||
int outputBufferSize(); | ||
|
||
/** | ||
* By default, we assume a default produced media type of "text/plain" | ||
* for String endpoint return types. If this is disabled, the default | ||
* produced media type will be "[text/plain, */*]" which is more | ||
* expensive due to negotiation. | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
public boolean singleDefaultProduces; | ||
@WithDefault("true") | ||
boolean singleDefaultProduces(); | ||
|
||
/** | ||
* When one of the quarkus-resteasy-reactive-jackson or quarkus-resteasy-reactive-jsonb extension are active | ||
* and the result type of an endpoint is an application class or one of {@code Collection}, {@code List}, {@code Set} or | ||
* {@code Map}, | ||
* we assume the default return type is "application/json" if this configuration is enabled. | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
@WithDefault("true") | ||
@Experimental("This flag has a high probability of going away in the future") | ||
public boolean defaultProduces; | ||
boolean defaultProduces(); | ||
|
||
/** | ||
* Whether annotations such `@IfBuildTimeProfile`, `@IfBuildTimeProperty` and friends will be taken | ||
* into account when used on JAX-RS classes. | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
public boolean buildTimeConditionAware; | ||
@WithDefault("true") | ||
boolean buildTimeConditionAware(); | ||
|
||
/** | ||
* Whether duplicate endpoints should trigger error at startup | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
public boolean failOnDuplicate; | ||
@WithDefault("true") | ||
boolean failOnDuplicate(); | ||
} |
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
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
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
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
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