- java.lang.Object
-
- io.helidon.webserver.cors.CorsSupportBase<ServerRequest,ServerResponse,CorsSupport,CorsSupport.Builder>
-
- io.helidon.webserver.cors.CorsSupport
-
- All Implemented Interfaces:
Handler
,Service
,BiConsumer<ServerRequest,ServerResponse>
public class CorsSupport extends CorsSupportBase<ServerRequest,ServerResponse,CorsSupport,CorsSupport.Builder> implements Service, Handler
SE implementation ofCorsSupportBase
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CorsSupport.Builder
Fluent API builder forCorsSupport
.-
Nested classes/interfaces inherited from class io.helidon.webserver.cors.CorsSupportBase
CorsSupportBase.RequestAdapter<T>, CorsSupportBase.ResponseAdapter<T>
-
Nested classes/interfaces inherited from interface io.helidon.webserver.Handler
Handler.EntityHandler<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ServerRequest request, ServerResponse response)
static CorsSupport.Builder
builder()
static CorsSupport
create()
static CorsSupport
create(Config config)
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.String
toString()
void
update(Routing.Rules rules)
UpdatesRouting.Rules
withhandlers
representing this service.-
Methods inherited from class io.helidon.webserver.cors.CorsSupportBase
describe, helper, name, prepareResponse, processRequest
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.function.BiConsumer
andThen
-
-
-
-
Method Detail
-
builder
public static CorsSupport.Builder builder()
- Returns:
- new builder for CorsSupport
-
create
public static CorsSupport create()
- Returns:
- new CorsSupport with default settings
-
update
public void update(Routing.Rules rules)
Description copied from interface:Service
UpdatesRouting.Rules
withhandlers
representing this service.
-
accept
public void accept(ServerRequest request, ServerResponse response)
Description copied from interface:Handler
- Specified by:
accept
in interfaceBiConsumer<ServerRequest,ServerResponse>
- Specified by:
accept
in interfaceHandler
- Parameters:
request
- an HTTP server request.response
- an HTTP server response.
-
create
public static CorsSupport create(Config config)
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
public static CorsSupport createMapped(Config config)
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
-
-