Module io.jooby
Package io.jooby

Interface Route.Handler

All Superinterfaces:
Route.Aware, Serializable
All Known Implementing Classes:
AssetHandler
Enclosing class:
Route

public static interface Route.Handler extends Serializable, Route.Aware
Route handler here is where the application logic lives.
Since:
2.0.0
Author:
edgar
  • Method Summary

    Modifier and Type
    Method
    Description
    Execute application code.
    Chain this after decorator with next and produces a new decorator.

    Methods inherited from interface io.jooby.Route.Aware

    setRoute
  • Method Details

    • apply

      @NonNull Object apply(@NonNull Context ctx) throws Exception
      Execute application code.
      Parameters:
      ctx - Web context.
      Returns:
      Route response.
      Throws:
      Exception - If something goes wrong.
    • then

      @NonNull default Route.Handler then(@NonNull Route.After next)
      Chain this after decorator with next and produces a new decorator.
      Parameters:
      next - Next decorator.
      Returns:
      A new handler.