jetbrains.buildServer.spring
Class SpringSubContainerFactroyImpl.SpringContextImpl

java.lang.Object
  extended by jetbrains.buildServer.spring.SpringSubContainerFactroyImpl.SpringContextImpl
All Implemented Interfaces:
ServiceLocator, SpringContext, Disposable
Enclosing class:
SpringSubContainerFactroyImpl

public static class SpringSubContainerFactroyImpl.SpringContextImpl
extends java.lang.Object
implements SpringContext


Constructor Summary
SpringSubContainerFactroyImpl.SpringContextImpl(jetbrains.buildServer.spring.SpringSubContainerFactroyImpl.TeamCitySpringSubConatiner conatiner)
           
 
Method Summary
 void dispose()
           
<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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringSubContainerFactroyImpl.SpringContextImpl

public SpringSubContainerFactroyImpl.SpringContextImpl(@NotNull
                                                       jetbrains.buildServer.spring.SpringSubContainerFactroyImpl.TeamCitySpringSubConatiner conatiner)
Method Detail

getSingletonService

@NotNull
public <T> T getSingletonService(@NotNull
                                         java.lang.Class<T> serviceClass)
                      throws ServiceNotFoundException
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
Throws:
ServiceNotFoundException - if specified service was not found or if more than one service found

findSingletonService

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

dispose

public void dispose()
Specified by:
dispose in interface Disposable