java.lang.Object
io.helidon.cors.CorsSupportBase<ServerRequest,ServerResponse,CorsSupport,CorsSupport.Builder>
io.helidon.webserver.cors.CorsSupport
- All Implemented Interfaces:
Handler
,HttpService
,ServerLifecycle
public class CorsSupport
extends CorsSupportBase<ServerRequest,ServerResponse,CorsSupport,CorsSupport.Builder>
implements HttpService, Handler
SE implementation of
CorsSupportBase
.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CorsSupport.Builder
builder()
A new fluent API builder to customize setup of CorsSupport.static CorsSupport
create()
Create CORS support with defaults.static CorsSupport
Creates a newCorsSupport
instance based on the provided configuration expected to match the basicCrossOriginConfig
format.static CorsSupport
createMapped
(Config config) Creates a newCorsSupport
instance based on the provided configuration expected to contain mapped cross-origin config information.void
handle
(ServerRequest req, ServerResponse res) Handle request.protected CorsSupportHelper
<ServerRequest, ServerResponse> helper()
void
Updates the routing to add handlers of this service.toString()
Methods inherited from class io.helidon.cors.CorsSupportBase
describe, name, prepareResponse, processRequest
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.webserver.ServerLifecycle
afterStart, afterStop, beforeStart
-
Method Details
-
builder
A new fluent API builder to customize setup of CorsSupport.- Returns:
- new builder for CorsSupport
-
create
Create CORS support with defaults.- Returns:
- new CorsSupport with default settings
-
create
Creates a newCorsSupport
instance based on the provided configuration expected to match the basicCrossOriginConfig
format.- Parameters:
config
- node containing the cross-origin information- Returns:
- initialized
CorsSupport
instance
-
createMapped
Creates a newCorsSupport
instance based on the provided configuration expected to contain mapped cross-origin config information.- Parameters:
config
- node containing the mapped cross-origin information- Returns:
- initialized
CorsSupport
instance
-
routing
Description copied from interface:HttpService
Updates the routing to add handlers of this service.- Specified by:
routing
in interfaceHttpService
- Parameters:
rules
- to update
-
handle
Description copied from interface:Handler
Handle request. This method must not return before the response is completed. If the method does asynchronous operations, it must wait for them to complete before returning. -
toString
-
helper
- Overrides:
helper
in classCorsSupportBase<ServerRequest,
ServerResponse, CorsSupport, CorsSupport.Builder>
-