org.springframework.context.config
Class MBeanServerBeanDefinitionParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.springframework.context.config.MBeanServerBeanDefinitionParser
All Implemented Interfaces:
BeanDefinitionParser

 class MBeanServerBeanDefinitionParser
extends AbstractBeanDefinitionParser

Parser for the <context:mbean-server/> element.

Registers an instance of AnnotationMBeanExporter within the context.

Since:
2.5
Author:
Mark Fisher, Juergen Hoeller
See Also:
AnnotationMBeanExporter

Field Summary
private static java.lang.String AGENT_ID_ATTRIBUTE
           
private static java.lang.String MBEAN_SERVER_BEAN_NAME
           
private static boolean weblogicPresent
           
private static boolean webspherePresent
           
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
 
Constructor Summary
MBeanServerBeanDefinitionParser()
           
 
Method Summary
(package private) static AbstractBeanDefinition findServerForSpecialEnvironment()
           
protected  AbstractBeanDefinition parseInternal(org.w3c.dom.Element element, ParserContext parserContext)
          Central template method to actually parse the supplied Element into one or more BeanDefinitions.
protected  java.lang.String resolveId(org.w3c.dom.Element element, AbstractBeanDefinition definition, ParserContext parserContext)
          Resolve the ID for the supplied BeanDefinition.
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_SERVER_BEAN_NAME

private static final java.lang.String MBEAN_SERVER_BEAN_NAME
See Also:
Constant Field Values

AGENT_ID_ATTRIBUTE

private static final java.lang.String AGENT_ID_ATTRIBUTE
See Also:
Constant Field Values

weblogicPresent

private static final boolean weblogicPresent

webspherePresent

private static final boolean webspherePresent
Constructor Detail

MBeanServerBeanDefinitionParser

MBeanServerBeanDefinitionParser()
Method Detail

resolveId

protected java.lang.String resolveId(org.w3c.dom.Element element,
                                     AbstractBeanDefinition definition,
                                     ParserContext parserContext)
Description copied from class: AbstractBeanDefinitionParser
Resolve the ID for the supplied BeanDefinition.

When using generation, a name is generated automatically. Otherwise, the ID is extracted from the "id" attribute, potentially with a fallback to a generated id.

Overrides:
resolveId in class AbstractBeanDefinitionParser
Parameters:
element - the element that the bean definition has been built from
definition - the bean definition to be registered
parserContext - the object encapsulating the current state of the parsing process; provides access to a BeanDefinitionRegistry
Returns:
the resolved id

parseInternal

protected AbstractBeanDefinition parseInternal(org.w3c.dom.Element element,
                                               ParserContext parserContext)
Description copied from class: AbstractBeanDefinitionParser
Central template method to actually parse the supplied Element into one or more BeanDefinitions.

Specified by:
parseInternal in class AbstractBeanDefinitionParser
Parameters:
element - the element that is to be parsed into one or more BeanDefinitions
parserContext - the object encapsulating the current state of the parsing process; provides access to a BeanDefinitionRegistry
Returns:
the primary BeanDefinition resulting from the parsing of the supplied Element
See Also:
AbstractBeanDefinitionParser.parse(org.w3c.dom.Element, ParserContext), AbstractBeanDefinitionParser.postProcessComponentDefinition(org.springframework.beans.factory.parsing.BeanComponentDefinition)

findServerForSpecialEnvironment

static AbstractBeanDefinition findServerForSpecialEnvironment()