Coverage Report - org.mule.transport.rmi.config.RmiNamespaceHandler
 
Classes in this File Line Coverage Branch Coverage Complexity
RmiNamespaceHandler
100%
8/8
N/A
1
 
 1  
 /*
 2  
  * $Id: RmiNamespaceHandler.java 10494 2008-01-23 21:09:56Z acooke $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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  
 package org.mule.transport.rmi.config;
 11  
 
 12  
 import org.mule.api.config.MuleProperties;
 13  
 import org.mule.config.spring.factories.InboundEndpointFactoryBean;
 14  
 import org.mule.config.spring.factories.OutboundEndpointFactoryBean;
 15  
 import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
 16  
 import org.mule.config.spring.parsers.specific.endpoint.TransportEndpointDefinitionParser;
 17  
 import org.mule.config.spring.parsers.specific.endpoint.TransportGlobalEndpointDefinitionParser;
 18  
 import org.mule.endpoint.URIBuilder;
 19  
 import org.mule.transport.rmi.RmiConnector;
 20  
 
 21  
 /**
 22  
  * Registers a Bean Definition Parser for handling <code>&lt;rmi:connector&gt;</code> elements.
 23  
  *
 24  
  */
 25  32
 public class RmiNamespaceHandler extends AbstractMuleNamespaceHandler
 26  
 {
 27  
 
 28  
     public static final String OBJECT = "object";
 29  2
     public static final String[] PROPERTIES = new String[]{MuleProperties.MULE_METHOD_PROPERTY}; // , RmiConnector.PROPERTY_SERVICE_METHOD_PARAM_TYPES};
 30  2
     public static final String[] ADDRESS = new String[]{OBJECT, URIBuilder.HOST, URIBuilder.PORT};
 31  
 
 32  
     public void init()
 33  
     {
 34  32
         registerMuleBeanDefinitionParser("endpoint", new TransportGlobalEndpointDefinitionParser(RmiConnector.RMI, TransportGlobalEndpointDefinitionParser.PROTOCOL, ADDRESS, PROPERTIES)).addAlias(OBJECT, URIBuilder.PATH);
 35  32
         registerMuleBeanDefinitionParser("inbound-endpoint", new TransportEndpointDefinitionParser(RmiConnector.RMI, TransportGlobalEndpointDefinitionParser.PROTOCOL, InboundEndpointFactoryBean.class, ADDRESS, PROPERTIES)).addAlias(OBJECT, URIBuilder.PATH);
 36  32
         registerMuleBeanDefinitionParser("outbound-endpoint", new TransportEndpointDefinitionParser(RmiConnector.RMI, TransportGlobalEndpointDefinitionParser.PROTOCOL, OutboundEndpointFactoryBean.class, ADDRESS, PROPERTIES)).addAlias(OBJECT, URIBuilder.PATH);
 37  32
         registerConnectorDefinitionParser(RmiConnector.class);
 38  32
     }
 39  
 
 40  
 }