ec4f7c6c062fe5d4679d5ffbc81aaad1ac4b3647
[lispflowmapping.git] / mappingservice / southbound / src / main / java / org / opendaylight / controller / config / yang / config / lfm_mappingservice_sb / impl / LfmMappingServiceSbModule.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.config.yang.config.lfm_mappingservice_sb.impl;
10
11 import org.opendaylight.lispflowmapping.southbound.LispSouthboundPlugin;
12 import org.slf4j.LoggerFactory;
13 import org.slf4j.Logger;
14
15 public class LfmMappingServiceSbModule extends org.opendaylight.controller.config.yang.config.lfm_mappingservice_sb.impl.AbstractLfmMappingServiceSbModule {
16     private final static Logger LOG = LoggerFactory.getLogger(LfmMappingServiceSbModule.class);
17     private LispSouthboundPlugin sbPlugin;
18
19     public LfmMappingServiceSbModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
20         super(identifier, dependencyResolver);
21     }
22
23     public LfmMappingServiceSbModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.config.lfm_mappingservice_sb.impl.LfmMappingServiceSbModule oldModule, java.lang.AutoCloseable oldInstance) {
24         super(identifier, dependencyResolver, oldModule, oldInstance);
25     }
26
27     @Override
28     public void customValidation() {
29         // add custom validation form module attributes here.
30     }
31
32     @Override
33     public java.lang.AutoCloseable createInstance() {
34         LOG.debug("LfmMappingServiceSb Module up!");
35
36         sbPlugin = new LispSouthboundPlugin();
37         sbPlugin.setNotificationPublishService(getNotificationPublishServiceDependency());
38         sbPlugin.setRpcRegistryDependency(getRpcRegistryDependency());
39         sbPlugin.setBindingAwareBroker(getBrokerDependency());
40         sbPlugin.init();
41
42         return sbPlugin;
43     }
44
45 }