Module io.helidon.cors
Package io.helidon.cors
Class CorsSupportBase<Q,R,T extends CorsSupportBase<Q,R,T,B>,B extends CorsSupportBase.Builder<Q,R,T,B>>
java.lang.Object
io.helidon.cors.CorsSupportBase<Q,R,T,B>
- Type Parameters:
Q- request type wrapped by request adapterR- response type wrapped by response adapterT- concrete subclass ofCorsSupportBaseB- builder for concrete type<T>
- Direct Known Subclasses:
CorsSupport
@Deprecated(forRemoval=true,
since="4.4.0")
public abstract class CorsSupportBase<Q,R,T extends CorsSupportBase<Q,R,T,B>,B extends CorsSupportBase.Builder<Q,R,T,B>>
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
A Helidon service and handler implementation that implements CORS, for both the application and for built-in Helidon
services (such as OpenAPI and metrics).
The caller can set up the CorsSupportBase in a combination of these ways:
- from a
Confignode supplied programmatically, - from one or more
CrossOriginConfigobjects supplied programmatically, each associated with a path to which it applies, and - by setting individual CORS-related attributes on the
CorsSupportBase.Builder(which affects the CORS behavior for the "{+}" path).
See the CorsSupportBase.Builder.build() method for how the builder resolves conflicts among these sources.
If none of these sources is used, the CorsSupportBase applies defaults as described for
CrossOriginConfig.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCorsSupportBase.Builder<Q,R, T extends CorsSupportBase<Q, R, T, B>, B extends CorsSupportBase.Builder<Q, R, T, B>> Deprecated, for removal: This API element is subject to removal in a future version.Builder forCorsSupportBaseinstances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCorsSupportBase(CorsSupportBase.Builder<Q, R, T, B> builder) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringdescribe()Deprecated, for removal: This API element is subject to removal in a future version.protected CorsSupportHelper<Q, R> helper()Deprecated, for removal: This API element is subject to removal in a future version.protected Stringname()Deprecated, for removal: This API element is subject to removal in a future version.protected voidprepareResponse(CorsRequestAdapter<Q> requestAdapter, CorsResponseAdapter<R> responseAdapter) Deprecated, for removal: This API element is subject to removal in a future version.Not for developer user. Gets a response ready to participate in the CORS protocol.processRequest(CorsRequestAdapter<Q> requestAdapter, CorsResponseAdapter<R> responseAdapter) Deprecated, for removal: This API element is subject to removal in a future version.Not for developer use. Submits a request adapter and response adapter for CORS processing.
-
Constructor Details
-
CorsSupportBase
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
processRequest
protected Optional<R> processRequest(CorsRequestAdapter<Q> requestAdapter, CorsResponseAdapter<R> responseAdapter) Deprecated, for removal: This API element is subject to removal in a future version.Not for developer use. Submits a request adapter and response adapter for CORS processing.- Parameters:
requestAdapter- wrapper around the requestresponseAdapter- wrapper around the response- Returns:
- Optional of the response type U; present if the response should be returned, empty if request processing should continue
-
prepareResponse
protected void prepareResponse(CorsRequestAdapter<Q> requestAdapter, CorsResponseAdapter<R> responseAdapter) Deprecated, for removal: This API element is subject to removal in a future version.Not for developer user. Gets a response ready to participate in the CORS protocol.- Parameters:
requestAdapter- wrapper around the requestresponseAdapter- wrapper around the reseponse
-
helper
Deprecated, for removal: This API element is subject to removal in a future version. -
describe
Deprecated, for removal: This API element is subject to removal in a future version. -
name
Deprecated, for removal: This API element is subject to removal in a future version.
-
helidon-webserver-corswithio.helidon.webserver.cors.CorsFeatureeither fromServiceRegistry, or through one of the feature's static factory or builder methods; paths configured in config are registered first, before paths configured through service registry; this class will be removed in a future version of Helidon