org.axonframework.contextsupport.spring
Class ClusterBeanDefinitionParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.axonframework.contextsupport.spring.ClusterBeanDefinitionParser
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser

public class ClusterBeanDefinitionParser
extends org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

BeanDefinitionParser implementation that parses "cluster" elements. It creates the cluster as well as a selector that uses the criteria defined in the "selectors" sub-element to decide when the cluster must be selected for any given EventListener.

The selector bean is defined using the name [cluster-id] + "$selector" and implements the Ordered interface to define it's order relative to other selectors defined in the Spring Context.

If the cluster is defined as "default", another selector bean is defined under the name [cluster-id] + "$defaultSelector", which also implements the Ordered interface, forcing it to be evaluated last of all.

Since:
2.0
Author:
Allard Buijze

Field Summary
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
 
Constructor Summary
ClusterBeanDefinitionParser()
           
 
Method Summary
protected  org.springframework.beans.factory.support.AbstractBeanDefinition parseInternal(Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
           
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, resolveId, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterBeanDefinitionParser

public ClusterBeanDefinitionParser()
Method Detail

parseInternal

protected org.springframework.beans.factory.support.AbstractBeanDefinition parseInternal(Element element,
                                                                                         org.springframework.beans.factory.xml.ParserContext parserContext)
Specified by:
parseInternal in class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser


Copyright © 2010-2016. All Rights Reserved.