A Decorator allows you to annotate a function to wrap it, via
wrapFunction
. You can use this to perform additional validation before or
after the function runs, provide an additional parameter list of params,
open/commit/rollback database transactions before/after the function runs,
or even retrying the wrapped function if it fails.
Calls to the wrapped function are done on the delegate
parameter passed
to wrapFunction
, which takes a Map
representing any additional argument
lists (if any).
- Companion:
- object
class Annotation
class Object
trait Matchable
class Any
class websocket
trait WebEndpoint
class delete
class get
class options
class patch
class post
class put
class route
class getJson
class postForm
class postJson
class staticFiles
class staticResources
trait RawDecorator