|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.geronimo.kernel.config.Configuration
@GBean public class Configuration
A Configuration represents a collection of runnable services that can be loaded into a Geronimo Kernel and brought online. The primary components in a Configuration are a codebase, represented by a collection of URLs that is used to locate classes, and a collection of GBean instances that define its state.
The persistent attributes of the Configuration are:
| Constructor Summary | |
|---|---|
Configuration(ConfigurationData configurationData,
DependencyNode dependencyNode,
List<Configuration> allServiceParents,
ManageableAttributeStore attributeStore,
ConfigurationResolver configurationResolver,
ConfigurationManager configurationManager)
Creates a configuration. |
|
| Method Summary | |
|---|---|
void |
addGBean(GBeanData gbean)
|
AbstractName |
addGBean(String name,
GBeanData gbean)
|
boolean |
containsGBean(AbstractName gbean)
Determines of this configuration constains the specified GBean. |
void |
doFail()
Fails the GBean. |
void |
doStart()
Starts the GBean. |
void |
doStop()
Stops the target. |
AbstractName |
findGBean(AbstractNameQuery pattern)
|
AbstractName |
findGBean(ReferencePatterns referencePatterns)
|
AbstractName |
findGBean(Set<AbstractNameQuery> patterns)
|
GBeanData |
findGBeanData(AbstractNameQuery pattern)
|
GBeanData |
findGBeanData(Set<AbstractNameQuery> patterns)
|
LinkedHashSet<GBeanData> |
findGBeanDatas(Configuration configuration,
Set<AbstractNameQuery> patterns)
Find the gbeanDatas matching the patterns in this configuration only, ignoring parents. |
LinkedHashSet<GBeanData> |
findGBeanDatas(Set<AbstractNameQuery> patterns)
|
LinkedHashSet<AbstractName> |
findGBeans(AbstractNameQuery pattern)
|
LinkedHashSet<AbstractName> |
findGBeans(ReferencePatterns referencePatterns)
|
LinkedHashSet<AbstractName> |
findGBeans(Set<AbstractNameQuery> patterns)
|
AbstractName |
getAbstractName()
|
org.osgi.framework.Bundle |
getBundle()
Gets the class loader for this configuration. |
org.osgi.framework.BundleContext |
getBundleContext()
|
List<Configuration> |
getChildren()
Gets the nested configurations of this configuration. |
static AbstractName |
getConfigurationAbstractName(Artifact configId)
Converts an Artifact to an AbstractName for a configuration. |
File |
getConfigurationDir()
|
static Artifact |
getConfigurationID(ObjectName objectName)
|
ConfigurationResolver |
getConfigurationResolver()
Provide a way to locate where this configuration is for web apps and persistence units |
long |
getCreated()
Gets the time at which this configuration was created (or deployed). |
DependencyNode |
getDependencyNode()
Gets the parent configurations used for service resolution. |
Configuration |
getEnclosingConfiguration()
Gets the enclosing configuration of this one (e.g. |
Environment |
getEnvironment()
Gets the declaration of the environment in which this configuration runs. |
Map<AbstractName,GBeanData> |
getGBeans()
Gets an unmodifiable collection of the GBeanDatas for the GBeans in this configuration. |
Artifact |
getId()
Return the unique Id |
ConfigurationModuleType |
getModuleType()
Gets the type of the configuration (WAR, RAR et cetera) |
String |
getObjectName()
Gets the unique name of this configuration within the kernel. |
Set<Artifact> |
getOwnedConfigurations()
Gets the configurations owned by this configuration. |
static boolean |
isConfigurationObjectName(ObjectName name)
|
void |
removeGBean(AbstractName name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Configuration(@ParamAttribute(name="configurationData")
ConfigurationData configurationData,
@ParamAttribute(name="dependencyNode")
DependencyNode dependencyNode,
@ParamAttribute(name="allServiceParents")
List<Configuration> allServiceParents,
@ParamAttribute(name="attributeStore")
ManageableAttributeStore attributeStore,
@ParamAttribute(name="configurationResolver")
ConfigurationResolver configurationResolver,
@ParamAttribute(name="configurationManager")
ConfigurationManager configurationManager)
throws InvalidConfigException
configurationData - the module type, environment and classpath of the configurationdependencyNode - Class and Service parent idsallServiceParents - ordered list of transitive closure of service parents for gbean searchesattributeStore - Customization info for gbeansconfigurationResolver - (there should be a better way) Where this configuration is actually located in file system
InvalidConfigException - if this configuration turns out to have a problem.| Method Detail |
|---|
public static AbstractName getConfigurationAbstractName(Artifact configId)
throws InvalidConfigException
configId - id for configuration
InvalidConfigException - if the ObjectName could not be constructedpublic static boolean isConfigurationObjectName(ObjectName name)
public static Artifact getConfigurationID(ObjectName objectName)
public Artifact getId()
public String getObjectName()
public AbstractName getAbstractName()
public DependencyNode getDependencyNode()
public Environment getEnvironment()
public File getConfigurationDir()
public ConfigurationResolver getConfigurationResolver()
public ConfigurationModuleType getModuleType()
public long getCreated()
public org.osgi.framework.Bundle getBundle()
getBundle in interface ConfigurationParentpublic org.osgi.framework.BundleContext getBundleContext()
public List<Configuration> getChildren()
public Set<Artifact> getOwnedConfigurations()
public Map<AbstractName,GBeanData> getGBeans()
public boolean containsGBean(AbstractName gbean)
gbean - the name of the GBean
public Configuration getEnclosingConfiguration()
public AbstractName addGBean(String name,
GBeanData gbean)
throws GBeanAlreadyExistsException
GBeanAlreadyExistsException
public void addGBean(GBeanData gbean)
throws GBeanAlreadyExistsException
GBeanAlreadyExistsException
public void removeGBean(AbstractName name)
throws GBeanNotFoundException
GBeanNotFoundException
public AbstractName findGBean(AbstractNameQuery pattern)
throws GBeanNotFoundException
GBeanNotFoundException
public GBeanData findGBeanData(AbstractNameQuery pattern)
throws GBeanNotFoundException
GBeanNotFoundException
public AbstractName findGBean(ReferencePatterns referencePatterns)
throws GBeanNotFoundException
GBeanNotFoundException
public AbstractName findGBean(Set<AbstractNameQuery> patterns)
throws GBeanNotFoundException
GBeanNotFoundException
public GBeanData findGBeanData(Set<AbstractNameQuery> patterns)
throws GBeanNotFoundException
GBeanNotFoundExceptionpublic LinkedHashSet<AbstractName> findGBeans(AbstractNameQuery pattern)
public LinkedHashSet<AbstractName> findGBeans(ReferencePatterns referencePatterns)
public LinkedHashSet<AbstractName> findGBeans(Set<AbstractNameQuery> patterns)
public LinkedHashSet<GBeanData> findGBeanDatas(Set<AbstractNameQuery> patterns)
public LinkedHashSet<GBeanData> findGBeanDatas(Configuration configuration,
Set<AbstractNameQuery> patterns)
configuration - configuration to look inpatterns - patterns to look for
public void doStart()
throws Exception
GBeanLifecycle
doStart in interface GBeanLifecycleException - if the target failed to start; this will cause a transition to the failed state
public void doStop()
throws Exception
GBeanLifecycle
doStop in interface GBeanLifecycleException - if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail in interface GBeanLifecycle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||