Class AbstractRouteExtractor<A,B,C extends AbstractRoute<A,B,C,D,E,F>,D extends AbstractRouteManager<A,B,C,D,E,F>,E extends AbstractRouter<A,B,C,D,E,F>,F extends AbstractRouteExtractor<A,B,C,D,E,F>>

java.lang.Object
io.inverno.mod.http.base.router.AbstractRouteExtractor<A,B,C,D,E,F>
Type Parameters:
A - the resource type
B - the input type
C - the route type
D - the route manager type
E - the router type
F - the route extractor type
All Implemented Interfaces:
RouteExtractor<A,C>

public abstract class AbstractRouteExtractor<A,B,C extends AbstractRoute<A,B,C,D,E,F>,D extends AbstractRouteManager<A,B,C,D,E,F>,E extends AbstractRouter<A,B,C,D,E,F>,F extends AbstractRouteExtractor<A,B,C,D,E,F>> extends Object implements RouteExtractor<A,C>

Base RouteExtractor implementation.

Since:
1.12
Author:
Jeremy Kuhn
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final F
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a route extractor.
    protected
    Creates a route extractor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final void
    addRoute(C route)
    Stored the specified route in the list of extracted routes.
    final Set<C>
    Returns the set of extracted routes.
    protected abstract void
    Populates the route before storing it in the list of extracted routes.
    final void
    set(A resource, boolean disabled)
    Sets the resource extracted from the routing chain and stores the extracted routes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • AbstractRouteExtractor

      protected AbstractRouteExtractor(E router)

      Creates a route extractor.

      Parameters:
      router - the router
    • AbstractRouteExtractor

      protected AbstractRouteExtractor(F parent)

      Creates a route extractor.

      Parameters:
      parent - the parent route extractor
  • Method Details

    • addRoute

      protected final void addRoute(C route)

      Stored the specified route in the list of extracted routes.

      Parameters:
      route - a route
    • populateRoute

      protected abstract void populateRoute(C route)

      Populates the route before storing it in the list of extracted routes.

      This method is invoked when a resource is extracted in order to populate the route created by the router with the criteria extracted by the extractor.

      Parameters:
      route - a blank route
    • set

      public final void set(A resource, boolean disabled)
      Description copied from interface: RouteExtractor

      Sets the resource extracted from the routing chain and stores the extracted routes.

      Specified by:
      set in interface RouteExtractor<A,B>
      Parameters:
      resource - a resource
      disabled - true if the corresponding route is disabled, false otherwise
    • getRoutes

      public final Set<C> getRoutes()
      Description copied from interface: RouteExtractor

      Returns the set of extracted routes.

      Specified by:
      getRoutes in interface RouteExtractor<A,B>
      Returns:
      a set of routes