Fix modules Restconf call for mounted devices
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / rpc / impl / BrokerRpcExecutor.java
index 249b657d496218b40c4893c22d9f16ebc48f1b92..7077a8bd161be1d09c57b8c78fa906e287e4f25b 100644 (file)
@@ -1,12 +1,13 @@
 /*
-* Copyright (c) 2014 Brocade Communications 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
-*/
+ * Copyright (c) 2014 Brocade Communications 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.sal.restconf.rpc.impl;
 
+import java.util.concurrent.Future;
 import org.opendaylight.controller.sal.restconf.impl.BrokerFacade;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
@@ -15,14 +16,17 @@ import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
 public class BrokerRpcExecutor extends AbstractRpcExecutor {
     private final BrokerFacade broker;
 
-    public BrokerRpcExecutor( RpcDefinition rpcDef, BrokerFacade broker )
-    {
-        super( rpcDef );
+    public BrokerRpcExecutor(final RpcDefinition rpcDef, final BrokerFacade broker) {
+        super(rpcDef);
         this.broker = broker;
     }
 
+    /**
+     * @deprecated Method has to be removed for Lithium release
+     */
+    @Deprecated
     @Override
-    public RpcResult<CompositeNode> invokeRpc(CompositeNode rpcRequest) {
-        return getRpcResult( broker.invokeRpc( getRpcDefinition().getQName(), rpcRequest ) );
+    protected Future<RpcResult<CompositeNode>> invokeRpcUnchecked(final CompositeNode rpcRequest) {
+        throw new AbstractMethodError("Unsuported functionality");
     }
 }
\ No newline at end of file