JayD
JayD

Reputation: 986

How does jersey handles @pathparam injection internally?

I have been using jersey framework for developing restful web service in java for about a month now but somehow one thing i cant seem to comprehend is how does jersey handles @pathparam injection in resource methods,I know that hk2 is used under the hood for dependency injection in jersey and i know that abstract binder and factories are used for custom injection but i want some clear docs referring to the process of how does @Pathparam get injected into the method i.e step by step breakdown of some sort. I also came across the term ValueFactoryProvider while searching but all of it was pretty vague.

Upvotes: 1

Views: 63

Answers (1)

thomas77
thomas77

Reputation: 1150

Have a look at PathParamValueParamProvider in the jersey-server artifact. This seems to where the magic happens together with implementations of MultivaluedParameterExtractor. They are internal classes so I could not easily find any good javadoc. Looking at the sourcecode though, there are good comments which could help you break it down.

Upvotes: 1

Related Questions