2 * Copyright (c) 2015 Cisco Systems 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
8 package rpcbenchmark.impl;
10 import java.util.List;
12 import org.opendaylight.mdsal.binding.api.RpcProviderService;
13 import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.GlobalRpcBench;
14 import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.RoutedRpcBench;
15 import org.opendaylight.yangtools.concepts.Registration;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18 final class RoutedBindingRTCServer extends AbstractRpcbenchPayloadService implements AutoCloseable {
19 private final Registration reg;
21 RoutedBindingRTCServer(final RpcProviderService rpcProvider, final Set<InstanceIdentifier<?>> paths) {
22 reg = rpcProvider.registerRpcImplementations(List.of(
23 (GlobalRpcBench) this::globalRpcBench,
24 (RoutedRpcBench) this::routedRpcBench), paths);