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 org.opendaylight.mdsal.binding.api.RpcProviderService;
11 import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.GlobalRpcBench;
12 import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.RoutedRpcBench;
13 import org.opendaylight.yangtools.concepts.Registration;
14 import org.osgi.service.component.annotations.Reference;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
18 final class GlobalBindingRTCServer extends AbstractRpcbenchPayloadService implements AutoCloseable {
19 private static final Logger LOG = LoggerFactory.getLogger(GlobalBindingRTCServer.class);
21 private final Registration reg;
23 GlobalBindingRTCServer(@Reference final RpcProviderService rpcProvider) {
24 reg = rpcProvider.registerRpcImplementations(
25 (GlobalRpcBench) this::globalRpcBench,
26 (RoutedRpcBench) this::routedRpcBench);
27 LOG.debug("GlobalBindingRTCServer started");
33 LOG.debug("GlobalBindingRTCServer stopped");