Module io.inverno.mod.http.base
Package io.inverno.mod.http.base.router
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 typeB- the input typeC- the route typeD- the route manager typeE- the router typeF- 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
ConstructorsModifierConstructorDescriptionprotectedAbstractRoute(E router, A resource, boolean disabled) Creates a route. -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddisable()Disables the route in the router.final voidenable()Enables the route in the router.booleanfinal Aget()Returns the resource defined on the route.inthashCode()final booleanDetermines whether the route is disabled in the router.final voidremove()Removes the route from the router.
-
Constructor Details
-
AbstractRoute
Creates a route.
- Parameters:
router- the routerresource- the resourcedisabled- true to create a disabled route, false otherwise
-
-
Method Details
-
get
Description copied from interface:RouteReturns the resource defined on the route.
-
enable
public final void enable()Description copied from interface:RouteEnables the route in the router.
-
disable
public final void disable()Description copied from interface:RouteDisables the route in the router.
-
isDisabled
public final boolean isDisabled()Description copied from interface:RouteDetermines whether the route is disabled in the router.
- Specified by:
isDisabledin interfaceRoute<A>- Returns:
- true if the route is disabled, false otherwise
-
remove
public final void remove()Description copied from interface:RouteRemoves the route from the router.
-
equals
-
hashCode
public int hashCode()
-