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.transport.email.config;
8   
9   import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
10  import org.mule.config.spring.parsers.MuleDefinitionParserConfiguration;
11  import org.mule.endpoint.URIBuilder;
12  import org.mule.transport.email.Pop3Connector;
13  
14  /**
15   * Registers a Bean Definition Parser for handling <code><pop3:connector></code> elements.
16   *
17   */
18  public class Pop3NamespaceHandler extends AbstractMuleNamespaceHandler
19  {
20      public void init()
21      {
22          registerStandardTransportEndpoints(Pop3Connector.POP3, URIBuilder.USERHOST_ATTRIBUTES);
23  
24          MuleDefinitionParserConfiguration parser = registerConnectorDefinitionParser(Pop3Connector.class);
25          parser.addMapping("defaultProcessMessageAction", EmailNamespaceHandler.DEFAULT_PROCESS_MESSAGE_ACTION);
26      }
27  }