What are the entities of Service Locator pattern?
- Cache, Client, Service, Service Locator, and InitialContext
- Client, Service Locator, Service, InitialContext, and Cache
- InitialContext, Cache, Client, Service Locator, and Service
- Service, InitialContext, Service Locator, Cache, and Client
The entities of the Service Locator pattern are: Service, InitialContext, Service Locator, Cache, and Client. The Service represents the service being located. The InitialContext is responsible for performing the actual lookup of the service. The Service Locator acts as a cache, keeping track of services that have already been looked up. The Cache stores references to services that have already been looked up. The Client is the entity that requires access to the service.
Loading...