View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.client.config;
8   
9   import org.mule.config.spring.factories.InboundEndpointFactoryBean;
10  import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
11  import org.mule.config.spring.parsers.specific.endpoint.support.ChildEndpointDefinitionParser;
12  import org.mule.module.xml.transformer.wire.XStreamWireFormat;
13  import org.mule.transformer.wire.SerializedMuleMessageWireFormat;
14  
15  import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
16  
17  /**
18   * TODO
19   */
20  public class ClientNamespaceHandler extends NamespaceHandlerSupport
21  {
22      /**
23       * Invoked by the {@link org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader} after
24       * construction but before any custom elements are parsed.
25       *
26       * @see org.springframework.beans.factory.xml.NamespaceHandlerSupport#registerBeanDefinitionParser(String, org.springframework.beans.factory.xml.BeanDefinitionParser)
27       */
28      public void init()
29      {
30          registerBeanDefinitionParser("remote-dispatcher-agent", new RemoteDispatcherAgentDefinitionParser());
31          registerBeanDefinitionParser("remote-endpoint", new ChildEndpointDefinitionParser(InboundEndpointFactoryBean.class));
32          registerBeanDefinitionParser("xml-wire-format", new ChildDefinitionParser("wireFormat", XStreamWireFormat.class));
33          registerBeanDefinitionParser("serialization-wire-format", new ChildDefinitionParser("wireFormat", SerializedMuleMessageWireFormat.class));
34          registerBeanDefinitionParser("custom-wire-format", new ChildDefinitionParser("wireFormat"));
35      }
36  }