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
ModifierConstructorDescriptionprotected
AbstractRoute
(E router, A resource, boolean disabled) Creates a route. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
disable()
Disables the route in the router.final void
enable()
Enables the route in the router.boolean
final A
get()
Returns the resource defined on the route.int
hashCode()
final boolean
Determines whether the route is disabled in the router.final void
remove()
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:Route
Returns the resource defined on the route.
-
enable
public final void enable()Description copied from interface:Route
Enables the route in the router.
-
disable
public final void disable()Description copied from interface:Route
Disables the route in the router.
-
isDisabled
public final boolean isDisabled()Description copied from interface:Route
Determines whether the route is disabled in the router.
- Specified by:
isDisabled
in interfaceRoute<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.
-
equals
-
hashCode
public int hashCode()
-