Class AbstractRoute<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.AbstractRoute<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:
Route<A>

public abstract class AbstractRoute<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 Route<A>

Base Route implementation

Since:
1.12
Author:
Jeremy Kuhn
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractRoute(E router, A resource, boolean disabled)
    Creates a route.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Disables the route in the router.
    final void
    Enables the route in the router.
    boolean
     
    final A
    get()
    Returns the resource defined on the route.
    int
     
    final boolean
    Determines whether the route is disabled in the router.
    final void
    Removes the route from the router.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.inverno.mod.http.base.router.Route

    get
  • Constructor Details

    • AbstractRoute

      protected AbstractRoute(E router, A resource, boolean disabled)

      Creates a route.

      Parameters:
      router - the router
      resource - the resource
      disabled - true to create a disabled route, false otherwise
  • Method Details

    • get

      public final A get()
      Description copied from interface: Route

      Returns the resource defined on the route.

      Specified by:
      get in interface Route<A>
      Returns:
      a resource
    • enable

      public final void enable()
      Description copied from interface: Route

      Enables the route in the router.

      Specified by:
      enable in interface Route<A>
    • disable

      public final void disable()
      Description copied from interface: Route

      Disables the route in the router.

      Specified by:
      disable in interface Route<A>
    • isDisabled

      public final boolean isDisabled()
      Description copied from interface: Route

      Determines whether the route is disabled in the router.

      Specified by:
      isDisabled in interface Route<A>
      Returns:
      true if the route is disabled, false otherwise
    • remove

      public final void remove()
      Description copied from interface: Route

      Removes the route from the router.

      Specified by:
      remove in interface Route<A>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object