Package com.onenetwork.platform.env.servicelocator
Simple service locator for acquiring instances of Platform service interfaces.
All Platform stateless services extend the
com.onenetwork.platform.servicelocator.Service
marker interface. Clients are encouraged to use com.onenetwork.platform.servicelocator.Services#get(Class)
as their primary means
of acquiring services.
Code running inside the Platform server need not configure the com.onenetwork.platform.servicelocator.ServiceLocator
in any way; a default implementation
will be automatically registered during server startup. Code running outside the Platform server (for example, standalone unit tests) must register their own
ServiceLocator implementation through com.onenetwork.platform.servicelocator.ServiceLocatorRegistry
.
For a complete list of available services, see the "All Known Subinterfaces" section of com.onenetwork.platform.servicelocator.Service
.-
Interface Summary Interface Description Service Marker interface for stateless services.ServiceLocator Factory for acquiring instances of Platform services. -
Class Summary Class Description ServiceLocatorRegistry Central registry for theServiceLocator
instance to be used at runtime.Services Provides a convenient static method for acquiring a service:Services.get(Class)
is a shortcut forServiceLocatorRegistry.getServiceLocator().getService(clazz)
.