public class Crane4jApplicationContext extends DefaultContainerManager implements Crane4jGlobalConfiguration, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
The global configuration class implemented based on the Spring context,
when obtaining the required components from the instance,
will directly obtain the corresponding bean through the ApplicationContext held.
ApplicationContextDefaultContainerManager.CacheKeycontainerLifecycleProcessorList, containerMap, containerProviderMapPROVIDER_NAME_PREFIX| 构造器和说明 |
|---|
Crane4jApplicationContext() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet()
Load all
ContainerLifecycleProcessor from spring context. |
void |
afterSingletonsInstantiated()
After Spring initializes all singleton beans,
register all beans that implement the
Container interface with the current context. |
boolean |
containsContainer(String namespace)
Whether this provider has container of given
namespace. |
void |
destroy()
Clear container cache on destruction.
|
@NonNull AssembleOperationHandler |
getAssembleOperationHandler(@Nullable String handlerName,
Class<?> handlerType)
Get assemble operation handler.
|
@Nullable String |
getBeanNameByNamespace(String namespace)
Get bean name by namespace.
|
@NonNull BeanOperationExecutor |
getBeanOperationExecutor(@Nullable String executorName,
Class<?> executorType)
Get bean operation executor.
|
@NonNull BeanOperationParser |
getBeanOperationsParser(@Nullable String parserName,
Class<?> parserType)
Get bean operation parser.
|
@NonNull CacheManager |
getCacheManager(String name)
Get cache factory.
|
<K> @Nullable Container<K> |
getContainer(String namespace)
Obtaining and caching container instances from provider or definition.
|
<T extends ContainerProvider> |
getContainerProvider(String name)
Get
ContainerProvider by given name. |
ConverterManager |
getConverterManager()
Get
ConverterManager |
@NonNull DisassembleOperationHandler |
getDisassembleOperationHandler(@Nullable String handlerName,
Class<?> handlerType)
Get disassemble operation handler.
|
KeyResolver |
getKeyResolver(Class<? extends KeyResolver> resolverType)
Get key resolver.
|
@Nullable String |
getNamespaceByBeanName(String beanName)
Get namespace by bean name.
|
PropertyOperator |
getPropertyOperator()
Get property operator.
|
TypeResolver |
getTypeResolver()
Get type handler.
|
void |
registerCacheManager(CacheManager cacheManager)
Register cache manager.
|
clear, createContainer, createDefinition, getAllLimitedContainers, getCacheKey, getContainerLifecycleProcessors, registerContainer, registerContainerLifecycleProcessor, registerContainerProvider, setAllowContainerOverridingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAssembleOperationHandler, getAssembleOperationHandler, getBeanOperationExecutor, getBeanOperationExecutor, getBeanOperationsParser, getBeanOperationsParser, getDisassembleOperationHandler, getDisassembleOperationHandlercanonicalNamespace, clear, getAllLimitedContainers, getContainer, getContainerLifecycleProcessors, registerContainer, registerContainer, registerContainer, registerContainerLifecycleProcessor, registerContainerProvideraddPropertyMappingStrategy, getAllPropertyMappingStrategies, getPropertyMappingStrategy, removePropertyMappingStrategypublic ConverterManager getConverterManager()
ConverterManagergetConverterManager 在接口中 Crane4jGlobalConfigurationConverterManagerpublic PropertyOperator getPropertyOperator()
getPropertyOperator 在接口中 Crane4jGlobalConfigurationpublic TypeResolver getTypeResolver()
getTypeResolver 在接口中 Crane4jGlobalConfigurationpublic <T extends ContainerProvider> T getContainerProvider(String name)
ContainerProvider by given name.getContainerProvider 在接口中 ContainerManagergetContainerProvider 在类中 DefaultContainerManagername - nameContainerProvider instancepublic <K> @Nullable Container<K> getContainer(String namespace)
getContainer 在接口中 ContainerManagergetContainer 在接口中 ContainerProvidergetContainer 在类中 DefaultContainerManagernamespace - namespace of container, which can also be the cache name for the container instance.ContainerLifecycleProcessor.whenCreated(cn.crane4j.core.container.ContainerDefinition, cn.crane4j.core.container.Container<java.lang.Object>)public boolean containsContainer(String namespace)
namespace.containsContainer 在接口中 ContainerProvidercontainsContainer 在类中 DefaultContainerManagernamespace - namespacepublic @NonNull BeanOperationExecutor getBeanOperationExecutor(@Nullable String executorName, Class<?> executorType)
getBeanOperationExecutor 在接口中 Crane4jGlobalConfigurationexecutorName - executor nameexecutorType - executor typepublic @NonNull BeanOperationParser getBeanOperationsParser(@Nullable String parserName, Class<?> parserType)
getBeanOperationsParser 在接口中 Crane4jGlobalConfigurationparserName - parser nameparserType - parser typepublic @NonNull AssembleOperationHandler getAssembleOperationHandler(@Nullable String handlerName, Class<?> handlerType)
getAssembleOperationHandler 在接口中 Crane4jGlobalConfigurationhandlerName - handler namehandlerType - handler typepublic @NonNull DisassembleOperationHandler getDisassembleOperationHandler(@Nullable String handlerName, Class<?> handlerType)
getDisassembleOperationHandler 在接口中 Crane4jGlobalConfigurationhandlerName - handler namehandlerType - handler typepublic @NonNull CacheManager getCacheManager(String name)
getCacheManager 在接口中 Crane4jGlobalConfigurationname - cache factory namepublic void registerCacheManager(CacheManager cacheManager)
registerCacheManager 在接口中 Crane4jGlobalConfigurationcacheManager - cache managerpublic @Nullable String getBeanNameByNamespace(String namespace)
namespace - namespacepublic @Nullable String getNamespaceByBeanName(String beanName)
beanName - namespacepublic KeyResolver getKeyResolver(Class<? extends KeyResolver> resolverType)
getKeyResolver 在接口中 Crane4jGlobalConfigurationresolverType - resolver typepublic void afterPropertiesSet()
ContainerLifecycleProcessor from spring context.afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanpublic void afterSingletonsInstantiated()
Container interface with the current context.afterSingletonsInstantiated 在接口中 org.springframework.beans.factory.SmartInitializingSingletonpublic void destroy()
destroy 在接口中 org.springframework.beans.factory.DisposableBeanCopyright © 2024. All rights reserved.