|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.kernel.config.Configuration
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:
Field Summary | |
---|---|
static GBeanInfo |
GBEAN_INFO
|
Constructor Summary | |
---|---|
Configuration()
Only used to allow declaration as a reference. |
|
Configuration(Collection<Configuration> parents,
ConfigurationData configurationData,
ConfigurationResolver configurationResolver,
ManageableAttributeStore attributeStore)
Creates a configuration. |
Method Summary | |
---|---|
void |
addGBean(GBeanData gbean)
|
AbstractName |
addGBean(String name,
GBeanData gbean)
|
void |
addToClassPath(String pattern)
|
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()
|
List<Configuration> |
getChildren()
Gets the nested configurations of this configuration. |
List<Configuration> |
getClassParents()
Gets the parent configurations used for class loading. |
List<String> |
getClassPath()
Gets the relative class path (URIs) of this configuration. |
static AbstractName |
getConfigurationAbstractName(Artifact configId)
Converts an Artifact to an AbstractName for a configuration. |
ClassLoader |
getConfigurationClassLoader()
Gets the class loader for this configuration. |
File |
getConfigurationDir()
|
static Artifact |
getConfigurationID(ObjectName objectName)
|
ConfigurationResolver |
getConfigurationResolver()
Deprecated. this is only exposed temporarily for configuration manager |
long |
getCreated()
Gets the time at which this configuration was created (or deployed). |
LinkedHashSet<Artifact> |
getDependencies()
Gets the artifact dependencies of this configuration. |
Configuration |
getEnclosingConfiguration()
Gets the enclosing configuration of this one (e.g. the EAR for a WAR), or null if it has none. |
Environment |
getEnvironment()
Gets the declaration of the environment in which this configuration runs. |
static GBeanInfo |
getGBeanInfo()
|
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. |
List<Configuration> |
getServiceParents()
Gets the parent configurations used for service resolution. |
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 |
Field Detail |
---|
public static final GBeanInfo GBEAN_INFO
Constructor Detail |
---|
public Configuration()
public Configuration(Collection<Configuration> parents, ConfigurationData configurationData, ConfigurationResolver configurationResolver, ManageableAttributeStore attributeStore) throws MissingDependencyException, MalformedURLException, NoSuchConfigException, InvalidConfigException
parents
- parents of this configuation (not ordered)configurationData
- the module type, environment and classpath of the configurationconfigurationResolver
- used to resolve dependecies and paths
MissingDependencyException
MalformedURLException
NoSuchConfigException
InvalidConfigException
Method Detail |
---|
public static AbstractName getConfigurationAbstractName(Artifact configId) throws InvalidConfigException
InvalidConfigException
public static boolean isConfigurationObjectName(ObjectName name)
public static Artifact getConfigurationID(ObjectName objectName)
public Artifact getId()
public String getObjectName()
public AbstractName getAbstractName()
public List<Configuration> getClassParents()
public List<Configuration> getServiceParents()
public LinkedHashSet<Artifact> getDependencies()
public Environment getEnvironment()
public File getConfigurationDir()
public ConfigurationResolver getConfigurationResolver()
public List<String> getClassPath()
public void addToClassPath(String pattern) throws IOException
IOException
public ConfigurationModuleType getModuleType()
public long getCreated()
public ClassLoader getConfigurationClassLoader()
getConfigurationClassLoader
in interface ConfigurationParent
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
GBeanNotFoundException
public 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 GBeanLifecycle
Exception
- if the target failed to start; this will cause a transition to the failed statepublic void doStop() throws Exception
GBeanLifecycle
doStop
in interface GBeanLifecycle
Exception
- if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail
in interface GBeanLifecycle
public static GBeanInfo getGBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |