View Javadoc

1   /*
2    * $Id: ClientNamespaceHandler.java 11377 2008-03-16 18:18:33Z dfeist $
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.module.client.config;
11  
12  import org.mule.config.spring.factories.InboundEndpointFactoryBean;
13  import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
14  import org.mule.config.spring.parsers.specific.endpoint.GenericEndpointDefinitionParser;
15  import org.mule.module.xml.transformer.wire.XStreamWireFormat;
16  import org.mule.transformer.wire.SerializedMuleMessageWireFormat;
17  
18  import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
19  
20  /**
21   * TODO
22   */
23  public class ClientNamespaceHandler extends NamespaceHandlerSupport
24  {
25      /**
26       * Invoked by the {@link org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader} after
27       * construction but before any custom elements are parsed.
28       *
29       * @see org.springframework.beans.factory.xml.NamespaceHandlerSupport#registerBeanDefinitionParser(String, org.springframework.beans.factory.xml.BeanDefinitionParser)
30       */
31      public void init()
32      {
33          registerBeanDefinitionParser("remote-dispatcher-agent", new RemoteDispatcherAgentDefinitionParser());
34          registerBeanDefinitionParser("remote-endpoint", new GenericEndpointDefinitionParser(InboundEndpointFactoryBean.class));
35          registerBeanDefinitionParser("xml-wire-format", new ChildDefinitionParser("wireFormat", XStreamWireFormat.class));
36          registerBeanDefinitionParser("serialization-wire-format", new ChildDefinitionParser("wireFormat", SerializedMuleMessageWireFormat.class));
37          registerBeanDefinitionParser("custom-wire-format", new ChildDefinitionParser("wireFormat"));
38      }
39  }