Class SubResourceLocatorRouter
- java.lang.Object
-
- org.glassfish.jersey.server.internal.routing.SubResourceLocatorRouter
-
- All Implemented Interfaces:
Router
final class SubResourceLocatorRouter extends java.lang.Object implements Router
An methodAcceptorPair to accept sub-resource requests. It first retrieves the sub-resource instance by invoking the given model method. Then theRuntimeLocatorModelBuilder
is used to generate corresponding methodAcceptorPair. Finally the generated methodAcceptorPair is invoked to return the request methodAcceptorPair chain.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.jersey.server.internal.routing.Router
Router.Continuation
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Function<java.lang.Class<?>,?>
createFunction
private ResourceMethod
locatorModel
private JerseyResourceContext
resourceContext
private RuntimeLocatorModelBuilder
runtimeLocatorBuilder
private java.util.List<ParamValueFactoryWithSource<?>>
valueProviders
-
Constructor Summary
Constructors Constructor Description SubResourceLocatorRouter(java.util.function.Function<java.lang.Class<?>,?> createServiceFunction, java.util.Collection<ValueParamProvider> valueSuppliers, ResourceMethod locatorModel, JerseyResourceContext resourceContext, RuntimeLocatorModelBuilder runtimeLocatorBuilder)
Create a new sub-resource locator router.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Router.Continuation
apply(RequestProcessingContext processingContext)
Performs a request routing task and returns the routed request together with arouting continuation
.private java.lang.Object
getResource(RequestProcessingContext context)
-
-
-
Field Detail
-
locatorModel
private final ResourceMethod locatorModel
-
valueProviders
private final java.util.List<ParamValueFactoryWithSource<?>> valueProviders
-
runtimeLocatorBuilder
private final RuntimeLocatorModelBuilder runtimeLocatorBuilder
-
resourceContext
private final JerseyResourceContext resourceContext
-
createFunction
private final java.util.function.Function<java.lang.Class<?>,?> createFunction
-
-
Constructor Detail
-
SubResourceLocatorRouter
SubResourceLocatorRouter(java.util.function.Function<java.lang.Class<?>,?> createServiceFunction, java.util.Collection<ValueParamProvider> valueSuppliers, ResourceMethod locatorModel, JerseyResourceContext resourceContext, RuntimeLocatorModelBuilder runtimeLocatorBuilder)
Create a new sub-resource locator router.- Parameters:
createServiceFunction
- function to create a new service and make other operations (injection).valueSuppliers
- all registered value suppliers.locatorModel
- resource locator method model.resourceContext
- resource context to bind sub-resource locator singleton instances.runtimeLocatorBuilder
- original runtime model builder.
-
-
Method Detail
-
apply
public Router.Continuation apply(RequestProcessingContext processingContext)
Description copied from interface:Router
Performs a request routing task and returns the routed request together with arouting continuation
.
-
getResource
private java.lang.Object getResource(RequestProcessingContext context)
-
-