public class RouterFactoryOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RouterFactoryOptions.RouteNamingStrategy
The way an OpenAPI operation is transformed into a route name.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER
By default, RouterFactory mounts Not Implemented/Method Not Allowed handler
|
static boolean |
DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER
By default, RouterFactory will mount ResponseContentTypeHandler when required
|
static String |
DEFAULT_OPERATION_MODEL_KEY
By default, RouterFactory will not expose operation configuration in the the routing context
|
static boolean |
DEFAULT_REQUIRE_SECURITY_HANDLERS
By default, RouterFactory requires security handlers
to be defined while calling getRouter() or it will throw an Exception
|
static RouterFactoryOptions.RouteNamingStrategy |
DEFAULT_ROUTE_NAMING_STRATEGY
By default, RouterFactory will name routes by open api path.
|
Constructor and Description |
---|
RouterFactoryOptions() |
RouterFactoryOptions(JsonObject json) |
RouterFactoryOptions(RouterFactoryOptions other) |
Modifier and Type | Method and Description |
---|---|
String |
getOperationModelKey() |
RouterFactoryOptions.RouteNamingStrategy |
getRouteNamingStrategy() |
boolean |
isMountNotImplementedHandler() |
boolean |
isMountResponseContentTypeHandler() |
boolean |
isRequireSecurityHandlers() |
RouterFactoryOptions |
setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)
If true, Router Factory will automatically mount an handler that return HTTP 405/501 status code for each operation where you didn't specify an handler.
|
RouterFactoryOptions |
setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)
If true, when required, the factory will mount a
ResponseContentTypeHandler |
RouterFactoryOptions |
setOperationModelKey(String operationModelKey)
When set, an additional handler will be created to expose the operation model in the routing
context under the given key.
|
RouterFactoryOptions |
setRequireSecurityHandlers(boolean requireSecurityHandlers)
If true, when you call
RouterFactory.createRouter() ()} the factory will mount for every path
the required security handlers and, if a security handler is not defined, it throws an RouterFactoryException |
RouterFactoryOptions |
setRouteNamingStrategy(RouterFactoryOptions.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 RouterFactoryOptions.RouteNamingStrategy DEFAULT_ROUTE_NAMING_STRATEGY
public RouterFactoryOptions()
public RouterFactoryOptions(JsonObject json)
public RouterFactoryOptions(RouterFactoryOptions other)
public JsonObject toJson()
public boolean isMountNotImplementedHandler()
public RouterFactoryOptions setMountNotImplementedHandler(boolean mountOperationsWithoutHandler)
Router.errorHandler(int, Handler)
mountOperationsWithoutHandler
- public boolean isRequireSecurityHandlers()
public RouterFactoryOptions setRequireSecurityHandlers(boolean requireSecurityHandlers)
RouterFactory.createRouter()
()} the factory will mount for every path
the required security handlers and, if a security handler is not defined, it throws an RouterFactoryException
requireSecurityHandlers
- public boolean isMountResponseContentTypeHandler()
public RouterFactoryOptions setMountResponseContentTypeHandler(boolean mountResponseContentTypeHandler)
ResponseContentTypeHandler
mountResponseContentTypeHandler
- public String getOperationModelKey()
public RouterFactoryOptions setOperationModelKey(String operationModelKey)
operationModelKey
- public RouterFactoryOptions.RouteNamingStrategy getRouteNamingStrategy()
public RouterFactoryOptions setRouteNamingStrategy(RouterFactoryOptions.RouteNamingStrategy routeNamingStrategy)
routeNamingStrategy
- Copyright © 2020 Eclipse. All rights reserved.