public class ServiceLocator extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceLocator() |
protected |
ServiceLocator(String beanFactoryReferenceLocation,
String beanRefFactoryReferenceId) |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
getContext()
Gets the Spring ApplicationContext.
|
LocationService |
getLocationService()
Gets an instance of
LocationService. |
<S> S |
getService(String name,
Class<S> serviceType)
Get a service.
|
void |
init(String beanFactoryReferenceLocation)
Initializes the Spring application context from the given
beanFactoryReferenceLocation. |
void |
init(String beanFactoryReferenceLocation,
String beanRefFactoryReferenceId)
Initializes the Spring application context from the given
beanFactoryReferenceLocation. |
static ServiceLocator |
instance()
Gets the shared instance of this Class
|
void |
shutdown()
Shuts down the ServiceLocator and releases any used resources.
|
public static ServiceLocator instance()
public void init(String beanFactoryReferenceLocation, String beanRefFactoryReferenceId)
beanFactoryReferenceLocation. If null is
specified for the beanFactoryReferenceLocation then the
default application context will be used.beanFactoryReferenceLocation - the location of the beanRefFactory reference.public void init(String beanFactoryReferenceLocation)
beanFactoryReferenceLocation. If null is
specified for the beanFactoryReferenceLocation then the
default application context will be used.beanFactoryReferenceLocation - the location of the beanRefFactory reference.public void shutdown()
public <S> S getService(String name, Class<S> serviceType)
S - type of the servicename - name of the service (i.e name of the srping bean)serviceType - type of servicepublic final LocationService getLocationService()
LocationService.protected org.springframework.context.ApplicationContext getContext()
Copyright © 2013. All Rights Reserved.