|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.mae.app.AbstractMAEApplication
public abstract class AbstractMAEApplication
MAEApplication implementation that provides support for loading a full Maven component environment, complete
with MAELibrary's, ComponentSelector and InstanceRegistry. This class supervises the assembly
of the environment, giving the application developer an easy way to inject the behavior he needs.
| Constructor Summary | |
|---|---|
protected |
AbstractMAEApplication()
|
| Method Summary | ||
|---|---|---|
protected void |
afterLoading(MAEEmbedder embedder)
Hook allowing application developers access to the MAEEmbedder just after the registered external
component instances have been injected, but before loading is considered complete. |
|
protected void |
configureBuilder(MAEEmbedderBuilder builder)
Fine-tune the MAEEmbedderBuilder instance before it is used to create the MAEEmbedder that will
be used to load the application components. |
|
ComponentSelector |
getComponentSelector()
|
|
ExtensionConfiguration |
getConfiguration()
|
|
Set<ComponentKey<?>> |
getExportedComponents()
|
|
InstanceRegistry |
getInstanceRegistry()
|
|
String |
getLabel()
|
|
org.apache.log4j.Logger |
getLogger()
|
|
String |
getLogHandle()
|
|
Map<Class<?>,Set<ComponentKey<?>>> |
getManagementComponents()
|
|
Set<ComponentKey<?>> |
getManagementComponents(Class<?> managementType)
|
|
String |
getVersion()
|
|
protected VersionProvider |
getVersionProvider()
|
|
MAEApplication |
load()
Assemble the component environment, based on the information given in implementors of this abstract class and auto-detected libraries. |
|
void |
loadConfiguration(MAEConfiguration embConfig)
|
|
protected
|
setVirtualInstance(Class<C> virtualKey,
T instance)
Set the actual instance on a VirtualInstance that was registered previously. |
|
protected
|
setVirtualInstance(ComponentKey<C> virtualKey,
T instance)
Set the actual instance on a VirtualInstance that was registered previously. |
|
protected
|
withComponentInstance(ComponentKey<C> componentKey,
C instance)
Register a new, external component instance to make it available for injection, or to allow other components to be injected into it. |
|
protected void |
withComponentInstance(Object instance)
Register a new, external component instance for injection into other components, or to have components injected into it. |
|
protected AbstractMAEApplication |
withLibrary(MAELibrary library)
Programmatically add a new MAELibrary instance, beyond those that are automatically detected via the
/META-INF/services/org.apache.maven.mae.conf.MAELibrary files on the classpath. |
|
protected
|
withVirtualComponent(Class<C> virtualClass)
Register a new VirtualInstance, which allows the component environment to bind its requirements without
actually having access to the component instance. |
|
protected
|
withVirtualComponent(ComponentKey<C> virtualKey)
Register a new VirtualInstance, which allows the component environment to bind its requirements without
actually having access to the component instance. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.maven.mae.conf.MAELibrary |
|---|
getId, getName |
| Constructor Detail |
|---|
protected AbstractMAEApplication()
| Method Detail |
|---|
protected final AbstractMAEApplication withLibrary(MAELibrary library)
MAELibrary instance, beyond those that are automatically detected via the
/META-INF/services/org.apache.maven.mae.conf.MAELibrary files on the classpath.
public MAEApplication load()
throws MAEException
load in interface MAEApplicationMAEExceptionMAEApplication.load()protected final void withComponentInstance(Object instance)
protected final <C> void withVirtualComponent(Class<C> virtualClass)
VirtualInstance, which allows the component environment to bind its requirements without
actually having access to the component instance. The instance itself will be injected into the
VirtualInstance later.
protected final <C,T extends C> void setVirtualInstance(Class<C> virtualKey,
T instance)
VirtualInstance that was registered previously.
protected final <C> void withComponentInstance(ComponentKey<C> componentKey,
C instance)
protected final <C> void withVirtualComponent(ComponentKey<C> virtualKey)
VirtualInstance, which allows the component environment to bind its requirements without
actually having access to the component instance. The instance itself will be injected into the
VirtualInstance later.
protected final <C,T extends C> void setVirtualInstance(ComponentKey<C> virtualKey,
T instance)
VirtualInstance that was registered previously.
protected void configureBuilder(MAEEmbedderBuilder builder)
throws MAEException
MAEEmbedderBuilder instance before it is used to create the MAEEmbedder that will
be used to load the application components.
MAEException
protected void afterLoading(MAEEmbedder embedder)
throws MAEException
MAEEmbedder just after the registered external
component instances have been injected, but before loading is considered complete.
MAEExceptionpublic org.apache.log4j.Logger getLogger()
getLogger in interface MAELibrarypublic ExtensionConfiguration getConfiguration()
getConfiguration in interface MAELibrarypublic ComponentSelector getComponentSelector()
getComponentSelector in interface MAELibrarypublic Set<ComponentKey<?>> getExportedComponents()
getExportedComponents in interface MAELibrarypublic Set<ComponentKey<?>> getManagementComponents(Class<?> managementType)
getManagementComponents in interface MAELibrarypublic Map<Class<?>,Set<ComponentKey<?>>> getManagementComponents()
getManagementComponents in interface MAELibrarypublic String getLabel()
getLabel in interface MAELibrarypublic String getLogHandle()
getLogHandle in interface MAELibrary
public void loadConfiguration(MAEConfiguration embConfig)
throws ExtensionConfigurationException
loadConfiguration in interface MAELibraryExtensionConfigurationExceptionpublic final InstanceRegistry getInstanceRegistry()
getInstanceRegistry in interface MAELibrarypublic String getVersion()
getVersion in interface MAELibraryprotected VersionProvider getVersionProvider()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||