open class RouterFactoryOptions
Author
Francesco Guardiani @slinkydeveloper
RouterFactoryOptions()RouterFactoryOptions(json: JsonObject)RouterFactoryOptions(other: RouterFactoryOptions) |
static val DEFAULT_MOUNT_NOT_IMPLEMENTED_HANDLER: Boolean
By default, RouterFactory mounts Not Implemented handler |
|
static val DEFAULT_MOUNT_RESPONSE_CONTENT_TYPE_HANDLER: Boolean
By default, RouterFactory will mount ResponseContentTypeHandler when required |
|
static val DEFAULT_MOUNT_VALIDATION_FAILURE_HANDLER: Boolean
By default, RouterFactory loads validation failure handler |
|
static val DEFAULT_NOT_IMPLEMENTED_HANDLER: Handler<RoutingContext>
Default not implemented handler. It sends a response with status code 501, status message "Not Implemented" and empty body |
|
static val DEFAULT_REQUIRE_SECURITY_HANDLERS: Boolean
By default, RouterFactory requires security handlers to be defined while calling getRouter() or it will throw an Exception |
|
static val DEFAULT_VALIDATION_HANDLER: Handler<RoutingContext>
Default validation failure handler. When ValidationException occurs, It sends a response with status code 400, status message "Bad Request" and error message as body |
open fun addGlobalHandler(globalHandler: Handler<RoutingContext>): RouterFactoryOptions
Add global handler to be applied prior to io.vertx.ext.web.Router being generated. |
|
open fun getBodyHandler(): BodyHandler |
|
open fun getGlobalHandlers(): MutableList<Handler<RoutingContext>> |
|
open fun getNotImplementedFailureHandler(): Handler<RoutingContext> |
|
open fun getValidationFailureHandler(): Handler<RoutingContext> |
|
open fun isMountNotImplementedHandler(): Boolean |
|
open fun isMountResponseContentTypeHandler(): Boolean |
|
open fun isMountValidationFailureHandler(): Boolean |
|
open fun isRequireSecurityHandlers(): Boolean |
|
open fun setBodyHandler(bodyHandler: BodyHandler): RouterFactoryOptions
Supply your own BodyHandler if you would like to control body limit, uploads directory and deletion of uploaded files |
|
open fun setMountNotImplementedHandler(mountOperationsWithoutHandler: Boolean): RouterFactoryOptions
Automatic mount handlers that return HTTP 501 status code for operations where you didn't specify an handler. |
|
open fun setMountResponseContentTypeHandler(mountResponseContentTypeHandler: Boolean): RouterFactoryOptions
If true, when required, the factory will mount a io.vertx.ext.web.handler.ResponseContentTypeHandler |
|
open fun setMountValidationFailureHandler(mountGlobalValidationFailureHandler: Boolean): RouterFactoryOptions
Enable or disable validation failure handler. If you enable it during router creation a failure handler that manages ValidationException will be mounted. You can change the validation failure handler with with function |
|
open fun setNotImplementedFailureHandler(notImplementedFailureHandler: Handler<RoutingContext>): RouterFactoryOptions
Set not implemented failure handler. It's called when you don't define an handler for a specific operation. You can enable/disable this feature from |
|
open fun setRequireSecurityHandlers(requireSecurityHandlers: Boolean): RouterFactoryOptions
If true, when you call |
|
open fun setValidationFailureHandler(validationFailureHandler: Handler<RoutingContext>): RouterFactoryOptions
Set default validation failure handler. You can enable/disable this feature from |
|
open fun toJson(): JsonObject |