public class ComponentManagerImpl extends Object implements ComponentManager
| 限定符和类型 | 字段和说明 |
|---|---|
protected ConcurrentMap<ComponentName,ComponentInfo> |
registry
container for all components
|
protected ConcurrentMap<ComponentType,Map<ComponentName,ComponentInfo>> |
resolvedRegistry
container for resolved components
|
| 构造器和说明 |
|---|
ComponentManagerImpl(ClientFactoryInternal clientFactoryInternal) |
| 限定符和类型 | 方法和说明 |
|---|---|
ComponentInfo |
getComponentInfo(ComponentName name)
get concrete component by component name
|
Collection<ComponentInfo> |
getComponentInfos() |
Collection<ComponentInfo> |
getComponentInfosByType(ComponentType type)
get components by component type
|
Collection<ComponentInfo> |
getComponents()
get all components in this manager
|
Collection<ComponentType> |
getComponentTypes()
get all component types in this manager
|
Collection<ComponentName> |
getPendingComponentInfos() |
boolean |
isRegistered(ComponentName name)
whether the component is registered or not
|
void |
register(ComponentInfo componentInfo) |
ComponentInfo |
registerAndGet(ComponentInfo componentInfo)
register and get component in this manager
|
void |
registerComponentClient(Class<?> clientType,
Object client)
register component client in this manager
|
void |
shutdown()
Shuts down the component registry.
|
int |
size()
Gets the number of registered objects in this registry.
|
void |
unregister(ComponentInfo componentInfo)
remove component in this manager
|
protected ConcurrentMap<ComponentName,ComponentInfo> registry
protected ConcurrentMap<ComponentType,Map<ComponentName,ComponentInfo>> resolvedRegistry
public ComponentManagerImpl(ClientFactoryInternal clientFactoryInternal)
public Collection<ComponentInfo> getComponentInfos()
public Collection<ComponentName> getPendingComponentInfos()
public ComponentInfo getComponentInfo(ComponentName name)
ComponentManagergetComponentInfo 在接口中 ComponentManagername - component namepublic boolean isRegistered(ComponentName name)
ComponentManagerisRegistered 在接口中 ComponentManagername - namepublic Collection<ComponentInfo> getComponents()
ComponentManagergetComponents 在接口中 ComponentManagerpublic int size()
ComponentManagersize 在接口中 ComponentManagerpublic void shutdown()
ComponentManagerShuts down the component registry. This unregisters all objects registered in this registry.
shutdown 在接口中 ComponentManagerpublic Collection<ComponentType> getComponentTypes()
ComponentManagergetComponentTypes 在接口中 ComponentManagerpublic void register(ComponentInfo componentInfo)
register 在接口中 ComponentManagerpublic ComponentInfo registerAndGet(ComponentInfo componentInfo)
ComponentManagerregisterAndGet 在接口中 ComponentManagercomponentInfo - component that should be registeredpublic void registerComponentClient(Class<?> clientType, Object client)
ComponentManagerregisterComponentClient 在接口中 ComponentManagerclientType - client typeclient - client implementationpublic void unregister(ComponentInfo componentInfo) throws ServiceRuntimeException
ComponentManagerunregister 在接口中 ComponentManagercomponentInfo - component that should unregisterServiceRuntimeException - throws when exception occurpublic Collection<ComponentInfo> getComponentInfosByType(ComponentType type)
ComponentManagergetComponentInfosByType 在接口中 ComponentManagertype - component typeCopyright © 2018 Pivotal Software, Inc.. All rights reserved.