Package io.mangoo.routing.routes
Class ControllerRoute
java.lang.Object
io.mangoo.routing.routes.ControllerRoute
- Author:
- svenkubiak
-
Constructor Summary
ConstructorsConstructorDescriptionControllerRoute(Class<?> clazz) Creates a new set of routes bind to a given controller class -
Method Summary
Modifier and TypeMethodDescriptionClass<?>booleanbooleanbooleanbooleanSets authentication to true for all provided routes, default is falseSets authentication to true for all provided routes, default is false Also sets authentication to true, default is falsewithBasicAuthentication(String username, String password) Sets Basic HTTP authentication to all method on the given controller classConfigures this request as long-running request that is executed in a different thread pool to not block the non-blocking I/O requestvoidwithRoutes(MangooRoute... routes) Sets the given routes to the defined controller class
-
Constructor Details
-
ControllerRoute
Creates a new set of routes bind to a given controller class- Parameters:
clazz- The controller class to bind to
-
-
Method Details
-
withRoutes
Sets the given routes to the defined controller class- Parameters:
routes- The routes to be configured for the controller
-
withBasicAuthentication
Sets Basic HTTP authentication to all method on the given controller class- Parameters:
username- The username for basic authentication in clear textpassword- The password for basic authentication in clear text- Returns:
- controller route instance
-
withAuthentication
Sets authentication to true for all provided routes, default is false- Returns:
- controller route instance
-
withAuthorization
Sets authentication to true for all provided routes, default is false Also sets authentication to true, default is false- Returns:
- controller route instance
-
withNonBlocking
Configures this request as long-running request that is executed in a different thread pool to not block the non-blocking I/O request- Returns:
- ControllerRoute instance
-
hasAuthentication
public boolean hasAuthentication() -
hasAuthorization
public boolean hasAuthorization() -
hasBlocking
public boolean hasBlocking() -
hasBasicAuthentication
public boolean hasBasicAuthentication() -
getControllerClass
-
getUsername
-
getPassword
-