Package jetbrains.buildServer
Class ServiceLocatorImpl
- java.lang.Object
-
- jetbrains.buildServer.ServiceLocatorImpl
-
- All Implemented Interfaces:
ServiceLocator
- Direct Known Subclasses:
ExtendableServiceLocator
public class ServiceLocatorImpl extends Object implements ServiceLocator
- Author:
- Eugene Petrenko Created: 10.02.2009 18:03:51
-
-
Constructor Summary
Constructors Constructor Description ServiceLocatorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
findSingletonService(Class<T> serviceClass)
Searches for singleton service of specified type<T> Collection<T>
getServices(Class<T> serviceClass)
Searches for all bean instances of type<T> T
getSingletonService(Class<T> serviceClass)
Searches for singleton service of specified typeSpringAccessor
getSpringAccessor()
protected <T> Collection<T>
getSpringBeansOfType(Class<T> extensionClass, boolean autowireCandidatesOnly)
void
setSpringAccessor(SpringAccessor springAccessor)
-
-
-
Method Detail
-
getSpringBeansOfType
protected final <T> Collection<T> getSpringBeansOfType(@NotNull Class<T> extensionClass, boolean autowireCandidatesOnly)
-
setSpringAccessor
@Autowired public void setSpringAccessor(@NotNull SpringAccessor springAccessor)
-
getSpringAccessor
public SpringAccessor getSpringAccessor()
-
getSingletonService
@NotNull public <T> T getSingletonService(@NotNull Class<T> serviceClass)
Description copied from interface:ServiceLocator
Searches for singleton service of specified type- Specified by:
getSingletonService
in interfaceServiceLocator
- Parameters:
serviceClass
- type of the service- Returns:
- found service, never null
-
findSingletonService
@Nullable public <T> T findSingletonService(@NotNull Class<T> serviceClass)
Description copied from interface:ServiceLocator
Searches for singleton service of specified type- Specified by:
findSingletonService
in interfaceServiceLocator
- Parameters:
serviceClass
- type of the service- Returns:
- found service or null if there's no such service
-
getServices
@NotNull public <T> Collection<T> getServices(@NotNull Class<T> serviceClass)
Description copied from interface:ServiceLocator
Searches for all bean instances of type- Specified by:
getServices
in interfaceServiceLocator
- Parameters:
serviceClass
- - type to search- Returns:
- collection of classes that implements T
-
-