Merge "Exception for URI /restconf/operations/module_name:rpc ended with slash"
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / implementation / src / main / java / org / opendaylight / controller / config / yang / md / sal / remote / rpc / ZeroMQServerModule.java
index 11179864293ca663776d6e04e8b44b7b448d25cc..d874381ab374eb2d32a10e09bf959dc810080c0d 100644 (file)
@@ -1,16 +1,15 @@
-/**
-* Generated file
-
-* Generated from: yang module name: odl-sal-dom-rpc-remote-cfg  yang module local name: remote-zeromq-rpc-server
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Thu Dec 05 14:25:21 CET 2013
-*
-* Do not modify this file unless it is present under src/main directory
-*/
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.config.yang.md.sal.remote.rpc;
 
 import org.opendaylight.controller.sal.connector.remoterpc.*;
 import org.opendaylight.controller.sal.core.api.Broker;
+import org.opendaylight.controller.sal.core.api.RpcProvisionRegistry;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -42,26 +41,24 @@ public final class ZeroMQServerModule extends org.opendaylight.controller.config
         
         Broker broker = getDomBrokerDependency();
 
-
-        
         final int port = getPort() != null ? getPort() : ZEROMQ_ROUTER_PORT;
 
         ServerImpl serverImpl = new ServerImpl(port);
         
         ClientImpl clientImpl = new ClientImpl();
 
-        RoutingTableProvider provider = new RoutingTableProvider(bundleContext,serverImpl);
+    RoutingTableProvider provider = new RoutingTableProvider(bundleContext);//,serverImpl);
 
 
-        RemoteRpcProvider facade = new RemoteRpcProvider(serverImpl, clientImpl);
-        
-        facade.setRoutingTableProvider(provider );
-        
-        broker.registerProvider(facade, bundleContext);
-        return facade;
-    }
+    facade.setRoutingTableProvider(provider );
+    facade.setContext(bundleContext);
+    facade.setRpcProvisionRegistry((RpcProvisionRegistry) broker);
 
-    public void setBundleContext(BundleContext bundleContext) {
-        this.bundleContext = bundleContext;
-    }
+    broker.registerProvider(facade, bundleContext);
+    return facade;
+  }
+
+  public void setBundleContext(BundleContext bundleContext) {
+    this.bundleContext = bundleContext;
+  }
 }