2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.config.yang.md.sal.rest.connector;
11 import org.opendaylight.netconf.sal.restconf.impl.RestconfProviderImpl;
14 public class RestConnectorModule extends org.opendaylight.controller.config.yang.md.sal.rest.connector.AbstractRestConnectorModule {
16 private static RestConnectorRuntimeRegistration runtimeRegistration;
18 public RestConnectorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
19 super(identifier, dependencyResolver);
22 public RestConnectorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.md.sal.rest.connector.RestConnectorModule oldModule, java.lang.AutoCloseable oldInstance) {
23 super(identifier, dependencyResolver, oldModule, oldInstance);
27 public void customValidation() {
28 // add custom validation form module attributes here.
32 public java.lang.AutoCloseable createInstance() {
33 // Create an instance of our provider
34 RestconfProviderImpl instance = new RestconfProviderImpl();
36 instance.setWebsocketPort(getWebsocketPort());
37 // Register it with the Broker
38 getDomBrokerDependency().registerProvider(instance);
40 if(runtimeRegistration != null){
41 runtimeRegistration.close();
45 getRootRuntimeBeanRegistratorWrapper().register(instance);