|
||||||||||
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 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 patterns)
|
GBeanData |
findGBeanData(AbstractNameQuery pattern)
|
GBeanData |
findGBeanData(Set patterns)
|
LinkedHashSet |
findGBeanDatas(Set patterns)
|
LinkedHashSet |
findGBeans(AbstractNameQuery pattern)
|
LinkedHashSet |
findGBeans(ReferencePatterns referencePatterns)
|
LinkedHashSet |
findGBeans(Set patterns)
|
AbstractName |
getAbstractName()
|
List |
getChildren()
Gets the nested configurations of this configuration. |
List |
getClassParents()
Gets the parent configurations used for class loading. |
List |
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. |
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 |
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 |
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 |
getOwnedConfigurations()
Gets the configurations owned by this configuration. |
List |
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 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 getClassParents()
public List getServiceParents()
public LinkedHashSet getDependencies()
public Environment getEnvironment()
public ConfigurationResolver getConfigurationResolver()
public List getClassPath()
public void addToClassPath(String pattern) throws IOException
IOException
public ConfigurationModuleType getModuleType()
public long getCreated()
public ClassLoader getConfigurationClassLoader()
getConfigurationClassLoader
in interface ConfigurationParent
public List getChildren()
public Set getOwnedConfigurations()
public Map 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 patterns) throws GBeanNotFoundException
GBeanNotFoundException
public GBeanData findGBeanData(Set patterns) throws GBeanNotFoundException
GBeanNotFoundException
public LinkedHashSet findGBeans(AbstractNameQuery pattern)
public LinkedHashSet findGBeans(ReferencePatterns referencePatterns)
public LinkedHashSet findGBeans(Set patterns)
public LinkedHashSet findGBeanDatas(Set patterns)
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 |