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.
public class DelegatingRouteMatcher<R> extends RouteMatcher<R>
A route matcher that delegates to a provided route matcher.
-
-
Constructor Summary
Constructors Constructor Description DelegatingRouteMatcher(RouteMatcher<R> delegate)Create a new route matcher, delegating to the provided delegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)RouteMatchevaluate(Context context, R request)Evaluates the request and determines whether it matches the route.inthashCode()StringidFragment()The fragment of an API ID that this matcher provides.StringtoString()Returns aStringrepresentation of the route matcher.<D> DtransformApi(D descriptor, ApiProducer<D> producer)Transform the API Descriptor as appropriate for the parent router's view of the child routes.
-
-
-
Constructor Detail
-
DelegatingRouteMatcher
public DelegatingRouteMatcher(RouteMatcher<R> delegate)
Create a new route matcher, delegating to the provided delegate.- Parameters:
delegate- The delegate.
-
-
Method Detail
-
evaluate
public RouteMatch evaluate(Context context, R request)
Description copied from class:RouteMatcherEvaluates the request and determines whether it matches the route.- Specified by:
evaluatein classRouteMatcher<R>- Parameters:
context- The request context.request- The request.- Returns:
- A
RouteMatch, if the request matches the route, ornull, if not.
-
toString
public String toString()
Description copied from class:RouteMatcherReturns aStringrepresentation of the route matcher.- Specified by:
toStringin classRouteMatcher<R>- Returns:
- A string representation of the route matcher.
-
idFragment
public String idFragment()
Description copied from class:RouteMatcherThe fragment of an API ID that this matcher provides.- Specified by:
idFragmentin classRouteMatcher<R>- Returns:
- A fragment of the API ID.
-
hashCode
public int hashCode()
- Specified by:
hashCodein classRouteMatcher<R>
-
equals
public boolean equals(Object o)
- Specified by:
equalsin classRouteMatcher<R>
-
transformApi
public <D> D transformApi(D descriptor, ApiProducer<D> producer)Description copied from class:RouteMatcherTransform the API Descriptor as appropriate for the parent router's view of the child routes.- Specified by:
transformApiin 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.
-
-