Coverage Report - org.mule.config.spring.parsers.specific.InterceptorStackDefinitionParser
 
Classes in this File Line Coverage Branch Coverage Complexity
InterceptorStackDefinitionParser
0%
0/6
N/A
1
 
 1  
 /*
 2  
  * $Id: InterceptorStackDefinitionParser.java 20540 2010-12-09 00:10:34Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.config.spring.parsers.specific;
 12  
 
 13  
 import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser;
 14  
 import org.mule.config.spring.parsers.MuleDefinitionParser;
 15  
 import org.mule.config.spring.parsers.delegate.ParentContextDefinitionParser;
 16  
 import org.mule.config.spring.parsers.generic.MuleOrphanDefinitionParser;
 17  
 import org.mule.config.spring.parsers.generic.ParentDefinitionParser;
 18  
 import org.mule.interceptor.InterceptorStack;
 19  
 
 20  
 /**
 21  
  * This allows a interceptor-stack to be defined globally, or configured on a
 22  
  * service.
 23  
  */
 24  
 public class InterceptorStackDefinitionParser extends ParentContextDefinitionParser
 25  
 {
 26  
     public static final String INTERCEPTOR_STACK = "interceptor";
 27  
     public static final String ATTRIBUTE_NAME = AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME;
 28  
 
 29  
     /**
 30  
      * For custom transformers
 31  
      */
 32  
     public InterceptorStackDefinitionParser()
 33  
     {
 34  
         // Interceptor stacks get next message processor etc. set in their chains and thus
 35  
         // cannot be singletons
 36  0
         super(MuleOrphanDefinitionParser.ROOT_ELEMENT, 
 37  
             new MuleOrphanDefinitionParser(InterceptorStack.class, false));
 38  0
         otherwise(addAlias(new ParentDefinitionParser(), AbstractMuleBeanDefinitionParser.ATTRIBUTE_REF,
 39  
             INTERCEPTOR_STACK));
 40  0
         super.addIgnored(ATTRIBUTE_NAME);
 41  0
     }
 42  
 
 43  
     private static MuleDefinitionParser addAlias(MuleDefinitionParser parser, String alias, String name)
 44  
     {
 45  0
         parser.addAlias(alias, name);
 46  0
         return parser;
 47  
     }
 48  
 }