Spring Data Couchbase

org.springframework.data.couchbase.config
Class CouchbaseJmxParser

java.lang.Object
  extended by org.springframework.data.couchbase.config.CouchbaseJmxParser
All Implemented Interfaces:
BeanDefinitionParser

public class CouchbaseJmxParser
extends Object
implements BeanDefinitionParser

Enables Parsing of the "" configuration bean. In order to enable JMX, different JmxComponents need to be registered. The dependency to the original CouchbaseClient object is solved by through the "couchbase-ref" attribute.

Author:
Michael Nitschinger

Constructor Summary
CouchbaseJmxParser()
           
 
Method Summary
protected  void createBeanDefEntry(Class<?> clazz, CompositeComponentDefinition compositeDef, String refName, Object eleSource, ParserContext parserContext)
          Creates Bean Definitions for JMX components and adds them as a nested component.
 BeanDefinition parse(Element element, ParserContext parserContext)
          Parse the element and dispatch the registration of the JMX components.
protected  void registerJmxComponents(String refName, Element element, ParserContext parserContext)
          Register the JMX components in the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CouchbaseJmxParser

public CouchbaseJmxParser()
Method Detail

parse

public BeanDefinition parse(Element element,
                            ParserContext parserContext)
Parse the element and dispatch the registration of the JMX components.

Specified by:
parse in interface BeanDefinitionParser
Parameters:
element - the XML element which contains the attributes.
parserContext - encapsulates the parsing state and configuration.
Returns:
null, because no bean instance needs to be returned.

registerJmxComponents

protected void registerJmxComponents(String refName,
                                     Element element,
                                     ParserContext parserContext)
Register the JMX components in the context.

Parameters:
refName - the reference name to the couchbase client.
element - the XML element which contains the attributes.
parserContext - encapsulates the parsing state and configuration.

createBeanDefEntry

protected void createBeanDefEntry(Class<?> clazz,
                                  CompositeComponentDefinition compositeDef,
                                  String refName,
                                  Object eleSource,
                                  ParserContext parserContext)
Creates Bean Definitions for JMX components and adds them as a nested component.

Parameters:
clazz - the class type to register.
compositeDef - component that can hold nested components.
refName - the reference name to the couchbase client.
eleSource - source element to reference.
parserContext - encapsulates the parsing state and configuration.

Spring Data Couchbase

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.