public class ApplicationContext extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed
Flag to know when context is closing
|
| Constructor and Description |
|---|
ApplicationContext() |
ApplicationContext(Class<?> excludeComponent) |
ApplicationContext(Set<Class<?>> excludeComponents) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static <O,C extends ApplicationComponent<O>> |
componentSupplier(Class<O> componentValueType,
Class<C> componentType) |
protected void |
finalize() |
static ApplicationContext |
get() |
<O> ApplicationComponent<O> |
getComponent(Class<O> componentType) |
<O,C extends ApplicationComponent<O>> |
getComponentTyped(Class<O> componentValueType,
Class<C> componentType) |
<O> O |
getComponentValue(Class<O> componentType) |
boolean |
isClosed() |
static boolean |
isInit() |
void |
lock() |
protected <O> void |
registerComponent(ApplicationComponent<O> component) |
protected void |
registerComponents(Map<Class<?>,ApplicationComponent<?>> componentMap) |
void |
releaseLock() |
public ApplicationContext()
public ApplicationContext(Class<?> excludeComponent)
public static boolean isInit()
public static ApplicationContext get()
public static <O,C extends ApplicationComponent<O>> ApplicationComponentSupplier<O,C> componentSupplier(Class<O> componentValueType, Class<C> componentType)
public void lock()
throws InterruptedException
InterruptedExceptionpublic void releaseLock()
public void close()
close in interface Closeableclose in interface AutoCloseableprotected void finalize()
throws Throwable
public boolean isClosed()
true si le context applicatif a été fermé (et est donc
passé dans la méthode close(), false autrement.public <O,C extends ApplicationComponent<O>> C getComponentTyped(Class<O> componentValueType, Class<C> componentType)
public <O> ApplicationComponent<O> getComponent(Class<O> componentType)
public <O> O getComponentValue(Class<O> componentType)
protected void registerComponents(Map<Class<?>,ApplicationComponent<?>> componentMap)
protected <O> void registerComponent(ApplicationComponent<O> component)
Copyright © 2019–2020 Ultreia.io. All rights reserved.