I - O - public abstract class Controller<I,O> extends Object
| Constructor and Description |
|---|
Controller() |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getHeader(String key)
Return a header entry
|
Optional<String> |
getPath(String key)
Return a path parameter value
|
abstract O |
handle(I input)
Should be implemented with controller logic
|
abstract String |
route()
Should be implemented and return a string like {HTTP_METHOD}:{PATH}
|
boolean |
shouldCreateInstanceIfNull()
If this method returns true it will always create an instance from input type
even if request body is empty
Default is true.
|
public abstract String route()
public abstract O handle(I input) throws HttpException
input - HttpExceptionpublic boolean shouldCreateInstanceIfNull()
Copyright © 2012–2019 jcabi.com. All rights reserved.