R
- The type of the request.public abstract class RouteMatcher<R> extends Object
RouteMatch
, if the route
matches, or null
, if the route does not match, from the
RouteMatcher.evaluate(Context, Object)
method.
Implementing classes must implement both RouteMatcher.equals(Object)
and
RouteMatcher.hashCode()
methods as each instance of a RouteMatcher
will be used as the key for a route.
Constructor and Description |
---|
RouteMatcher() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(Object o) |
abstract RouteMatch |
evaluate(Context context,
R request)
Evaluates the request and determines whether it matches the route.
|
abstract int |
hashCode() |
abstract String |
idFragment()
The fragment of an API ID that this matcher provides.
|
abstract String |
toString()
Returns a
String representation of the route matcher. |
abstract <D> D |
transformApi(D descriptor,
ApiProducer<D> producer)
Transform the API Descriptor as appropriate for the parent router's view of the child routes.
|
public abstract RouteMatch evaluate(Context context, R request)
context
- The request context.request
- The request.RouteMatch
, if the request matches the route, or
null
, if not.public abstract String toString()
String
representation of the route matcher.public abstract String idFragment()
public abstract <D> D transformApi(D descriptor, ApiProducer<D> producer)
D
- The type of descriptor object.descriptor
- The descriptor to be mutated.producer
- The API Descriptor producer.Copyright © 2010-2018, ForgeRock All Rights Reserved.