public class RouterBuilderOptions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CONTRACT_ENDPOINT
By default, RouterBuilder won't serve the contract
|
static boolean |
DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER
By default, RouterBuilder mounts Not Implemented/Method Not Allowed handler
|
static boolean |
DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER
By default, RouterBuilder will mount ResponseContentTypeHandler when required
|
static String |
DEFAULT_OPERATION_MODEL_KEY
By default, RouterBuilder will not expose operation configuration in the the routing context
|
static boolean |
DEFAULT_REQUIRE_SECURITY_HANDLERS
By default, RouterBuilder requires security handlers
to be defined while calling getRouter() or it will throw an Exception
|
static RouteNamingStrategy |
DEFAULT_ROUTE_NAMING_STRATEGY
By default, RouterBuilder will name routes by open api path.
|
static String |
STANDARD_CONTRACT_ENDPOINT
Standard OpenAPI contract endpoint as defined by
Microprofile OpenAPI spec
|
Constructor and Description |
---|
RouterBuilderOptions() |
RouterBuilderOptions(JsonObject json) |
RouterBuilderOptions(RouterBuilderOptions other) |
Modifier and Type | Method and Description |
---|---|
String |
getContractEndpoint() |
String |
getOperationModelKey() |
RouteNamingStrategy |
getRouteNamingStrategy() |
boolean |
isMountNotImplementedHandler() |
boolean |
isMountResponseContentTypeHandler() |
boolean |
isRequireSecurityHandlers() |
RouterBuilderOptions |
setContractEndpoint(String contractEndpoint)
Configures the endpoint where the contract is served.
|
RouterBuilderOptions |
setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)
If true, Router builder will automatically mount an handler that return HTTP 405/501 status code for each
operation where you didn't specify an handler.
|
RouterBuilderOptions |
setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)
If true, when required, the factory will mount a
ResponseContentTypeHandler |
RouterBuilderOptions |
setOperationModelKey(String operationModelKey)
When set, an additional handler will be created to expose the operation model in the routing
context under the given key.
|
RouterBuilderOptions |
setRequireSecurityHandlers(boolean requireSecurityHandlers)
If true, when you call
RouterBuilder.createRouter() ()} the factory will mount for every path
the required security handlers and, if a security handler is not defined, it throws an
RouterBuilderException |
RouterBuilderOptions |
setRouteNamingStrategy(RouteNamingStrategy routeNamingStrategy)
The strategy to follow when naming the generated routes.
|
JsonObject |
toJson() |
public static final boolean DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER
public static final boolean DEFAULT_REQUIRE_SECURITY_HANDLERS
public static final boolean DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER
public static final String DEFAULT_OPERATION_MODEL_KEY
public static final RouteNamingStrategy DEFAULT_ROUTE_NAMING_STRATEGY
public static final String DEFAULT_CONTRACT_ENDPOINT
public static final String STANDARD_CONTRACT_ENDPOINT
public RouterBuilderOptions()
public RouterBuilderOptions(JsonObject json)
public RouterBuilderOptions(RouterBuilderOptions other)
public JsonObject toJson()
public boolean isMountNotImplementedHandler()
public RouterBuilderOptions setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)
Router.errorHandler(int, Handler)
mountOperationsWithoutHandler
- public boolean isRequireSecurityHandlers()
public RouterBuilderOptions setRequireSecurityHandlers(boolean requireSecurityHandlers)
RouterBuilder.createRouter()
()} the factory will mount for every path
the required security handlers and, if a security handler is not defined, it throws an
RouterBuilderException
requireSecurityHandlers
- public boolean isMountResponseContentTypeHandler()
public RouterBuilderOptions setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)
ResponseContentTypeHandler
mountResponseContentTypeHandler
- public String getOperationModelKey()
public RouterBuilderOptions setOperationModelKey(String operationModelKey)
operationModelKey
- public RouteNamingStrategy getRouteNamingStrategy()
public RouterBuilderOptions setRouteNamingStrategy(RouteNamingStrategy routeNamingStrategy)
routeNamingStrategy
- public String getContractEndpoint()
public RouterBuilderOptions setContractEndpoint(String contractEndpoint)
contractEndpoint
- Copyright © 2022 Eclipse. All rights reserved.