Add service provider api to get instances of various services

Added a unit test. Existing tests are passing. @sumashivaprasad @Amareshwari  pls review.
Can you mark the configuration final? And add more documentation about the config on how it should be used and why is it not overridable.