2 * Copyright (c) 2013 Cisco Systems, Inc. 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 org.opendaylight.yangtools.restconf.client.to;
10 import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
11 import org.opendaylight.yangtools.restconf.client.BindingToRestRpc;
12 import org.opendaylight.yangtools.restconf.client.RestconfClientImpl;
13 import org.opendaylight.yangtools.restconf.client.api.rpc.RpcServiceContext;
14 import org.opendaylight.yangtools.yang.binding.RpcService;
15 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
16 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory;
19 public class RestRpcServiceContext <T extends RpcService> implements RpcServiceContext<T> {
21 private static final Logger logger = LoggerFactory.getLogger(RestRpcServiceContext.class);
22 private T rpcServiceProxy;
24 public RestRpcServiceContext(Class<T> rpcService,BindingNormalizedNodeCodecRegistry mappingService, RestconfClientImpl
25 restconfClient,SchemaContext schemaContext){
26 this.rpcServiceProxy = BindingToRestRpc.getProxy(rpcService,mappingService,restconfClient,schemaContext);
30 public T getRpcService() {
31 return this.rpcServiceProxy;