jetbrains.buildServer
Class ServiceLocatorImpl

java.lang.Object
  extended by jetbrains.buildServer.ServiceLocatorImpl
All Implemented Interfaces:
ServiceLocator

public class ServiceLocatorImpl
extends java.lang.Object
implements ServiceLocator

Author:
Eugene Petrenko Created: 10.02.2009 18:03:51

Constructor Summary
ServiceLocatorImpl()
           
 
Method Summary
<T> T
findSingletonService(java.lang.Class<T> serviceClass)
          Searches for singleton service of specified type
<T> java.util.Collection<T>
getServices(java.lang.Class<T> serviceClass)
          Searches for all bean instances of type
<T> T
getSingletonService(java.lang.Class<T> serviceClass)
          Searches for singleton service of specified type
 SpringAccessor getSpringAccessor()
           
protected
<T> java.util.Collection<T>
getSpringBeansOfType(java.lang.Class<T> extensionClass)
           
 void setSpringAccessor(SpringAccessor springAccessor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceLocatorImpl

public ServiceLocatorImpl()
Method Detail

getSpringBeansOfType

protected final <T> java.util.Collection<T> getSpringBeansOfType(@NotNull
                                                                 java.lang.Class<T> extensionClass)

setSpringAccessor

public void setSpringAccessor(@NotNull
                              SpringAccessor springAccessor)

getSpringAccessor

public SpringAccessor getSpringAccessor()

getSingletonService

@NotNull
public <T> T getSingletonService(@NotNull
                                         java.lang.Class<T> serviceClass)
Description copied from interface: ServiceLocator
Searches for singleton service of specified type

Specified by:
getSingletonService in interface ServiceLocator
Parameters:
serviceClass - type of the service
Returns:
found service, never null

findSingletonService

@Nullable
public <T> T findSingletonService(@NotNull
                                           java.lang.Class<T> serviceClass)
Description copied from interface: ServiceLocator
Searches for singleton service of specified type

Specified by:
findSingletonService in interface ServiceLocator
Parameters:
serviceClass - type of the service
Returns:
found service or null if there's no such service

getServices

@NotNull
public <T> java.util.Collection<T> getServices(@NotNull
                                                       java.lang.Class<T> serviceClass)
Description copied from interface: ServiceLocator
Searches for all bean instances of type

Specified by:
getServices in interface ServiceLocator
Parameters:
serviceClass - - type to search
Returns:
collection of classes that implements T