Package org.forgerock.services.routing
Class DelegatingRouteMatcher<R>
java.lang.Object
org.forgerock.services.routing.RouteMatcher<R>
org.forgerock.services.routing.DelegatingRouteMatcher<R>
- Type Parameters:
R
- The type or request being matched.
A route matcher that delegates to a provided route matcher.
-
Constructor Summary
ConstructorDescriptionDelegatingRouteMatcher
(RouteMatcher<R> delegate) Create a new route matcher, delegating to the provided delegate. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Evaluates the request and determines whether it matches the route.int
hashCode()
The fragment of an API ID that this matcher provides.toString()
Returns aString
representation of the route matcher.<D> D
transformApi
(D descriptor, ApiProducer<D> producer) Transform the API Descriptor as appropriate for the parent router's view of the child routes.
-
Constructor Details
-
DelegatingRouteMatcher
Create a new route matcher, delegating to the provided delegate.- Parameters:
delegate
- The delegate.
-
-
Method Details
-
evaluate
Description copied from class:RouteMatcher
Evaluates the request and determines whether it matches the route.- Specified by:
evaluate
in classRouteMatcher<R>
- Parameters:
context
- The request context.request
- The request.- Returns:
- A
RouteMatch
, if the request matches the route, ornull
, if not.
-
toString
Description copied from class:RouteMatcher
Returns aString
representation of the route matcher.- Specified by:
toString
in classRouteMatcher<R>
- Returns:
- A string representation of the route matcher.
-
idFragment
Description copied from class:RouteMatcher
The fragment of an API ID that this matcher provides.- Specified by:
idFragment
in classRouteMatcher<R>
- Returns:
- A fragment of the API ID.
-
hashCode
public int hashCode()- Specified by:
hashCode
in classRouteMatcher<R>
-
equals
- Specified by:
equals
in classRouteMatcher<R>
-
transformApi
Description copied from class:RouteMatcher
Transform the API Descriptor as appropriate for the parent router's view of the child routes.- Specified by:
transformApi
in classRouteMatcher<R>
- Type Parameters:
D
- The type of descriptor object.- Parameters:
descriptor
- The descriptor to be mutated.producer
- The API Descriptor producer.- Returns:
- The new descriptor object.
-