Package io.mangoo.routing.routes
Class RequestRoute
java.lang.Object
io.mangoo.routing.routes.RequestRoute
- All Implemented Interfaces:
MangooRoute
- Author:
- svenkubiak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>longHttp[]getUrl()booleanbooleanbooleanbooleanrespondeWith(String method) Sets the controller method to response on requestSets the URL for this routeSets authentication to true for this route, default is falsewithBasicAuthentication(String username, String password) Sets HTTP Basic authentication to this request on the defined controller classvoidwithControllerClass(Class<?> clazz) Sets the controller class of this requestvoidwithHttpMethod(Http method) Sets the HTTP method of this requestwithMaxPostSize(long size) Sets the max size of a body entityConfigures this request as long-running request that is executed in a different thread pool to not block the non-blocking I/O request
-
Constructor Details
-
RequestRoute
-
RequestRoute
-
-
Method Details
-
to
Sets the URL for this route- Parameters:
url- The URL for this route- Returns:
- RequestRoute instance
-
respondeWith
Sets the controller method to response on request- Parameters:
method- The controller method- Returns:
- RequestRoute instance
-
withControllerClass
Sets the controller class of this request- Parameters:
clazz- The controller class
-
withHttpMethod
Sets the HTTP method of this request- Parameters:
method- The controller method
-
withBasicAuthentication
Sets HTTP Basic authentication to this request on the defined controller class- Parameters:
username- The username for basic authentication in cleartextpassword- The password for basic authentication in cleartext- Returns:
- RequestRoute instance
-
withAuthentication
Sets authentication to true for this route, default is false- Returns:
- RequestRoute 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:
- RequestRoute instance
-
withMaxPostSize
Sets the max size of a body entity- Parameters:
size- the size in bytes- Returns:
- RequestRoute instance
-
getMaxEntitySize
public long getMaxEntitySize() -
getUrl
- Specified by:
getUrlin interfaceMangooRoute- Returns:
- The configured URL for this route
-
hasAuthentication
public boolean hasAuthentication() -
hasBasicAuthentication
public boolean hasBasicAuthentication() -
getUsername
-
getPassword
-
hasMultipleMethods
public boolean hasMultipleMethods() -
getMethods
-
getControllerClass
-
getControllerMethod
-
getMethod
-
isBlocking
public boolean isBlocking()
-