View Javadoc

1   /*
2    * $Id: Pop3sNamespaceHandler.java 19698 2010-09-22 18:33:58Z esteban.robles $
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  package org.mule.transport.email.config;
11  
12  import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
13  import org.mule.config.spring.parsers.MuleDefinitionParserConfiguration;
14  import org.mule.config.spring.parsers.specific.tls.ClientKeyStoreDefinitionParser;
15  import org.mule.config.spring.parsers.specific.tls.TrustStoreDefinitionParser;
16  import org.mule.endpoint.URIBuilder;
17  import org.mule.transport.email.Pop3sConnector;
18  
19  /**
20   * Registers a Bean Definition Parser for handling <code><pop3s:connector></code> elements.
21   *
22   */
23  public class Pop3sNamespaceHandler extends AbstractMuleNamespaceHandler
24  {
25      public void init()
26      {
27          registerStandardTransportEndpoints(Pop3sConnector.POP3S, URIBuilder.USERHOST_ATTRIBUTES);
28  
29          MuleDefinitionParserConfiguration parser = registerConnectorDefinitionParser(Pop3sConnector.class);
30          parser.addMapping("defaultProcessMessageAction", EmailNamespaceHandler.DEFAULT_PROCESS_MESSAGE_ACTION);
31  
32          registerBeanDefinitionParser("tls-trust-store", new TrustStoreDefinitionParser());
33          registerBeanDefinitionParser("tls-client", new ClientKeyStoreDefinitionParser());
34      }
35  }