Jenkins classes are bound to URLs by using Stapler.
Jenkins instance is bound to the context root (most of the time "/") URL, and the rest of the objects are bound according to their reachability from this root object.
Stapler uses reflection to recursively determine how to process any given URL.
A few examples of how the URL
/foo/bar could be processed:
getFoo(String) is defined on the
Jenkins object, and Stapler passes
bar as a parameter.
The object returned has a method called
doIndex(…) that gets called and renders the response.
getFoo() is defined and returns an object that has a
The object returned from that has an associated
getFoo() is are defined and the returned object has a view named
doFoo() is defined.
A number of additional ways to handle requests exist, but these are the most common.