Bug 6714 - Use singleton service in clustered netconf topology
[netconf.git] / netconf / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / impl / ProxyDOMRpcService.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others. 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.netconf.topology.singleton.impl;
10
11 import com.google.common.util.concurrent.CheckedFuture;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14 import org.opendaylight.controller.md.sal.dom.api.DOMRpcAvailabilityListener;
15 import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
16 import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
17 import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
18 import org.opendaylight.yangtools.concepts.ListenerRegistration;
19 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
20 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
21
22 public class ProxyDOMRpcService implements DOMRpcService {
23
24     @Nonnull
25     @Override
26     public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull final SchemaPath type,
27                                                                   @Nullable final NormalizedNode<?, ?> input) {
28         throw new UnsupportedOperationException("InvokeRpc: DOMRpc service not working in cluster.");
29     }
30
31     @Nonnull
32     @Override
33     public <T extends DOMRpcAvailabilityListener> ListenerRegistration<T> registerRpcListener(
34             @Nonnull final T listener) {
35         throw new UnsupportedOperationException("RegisterRpcListener: DOMRpc service not working in cluster.");
36     }
37 }