Merge "Added initial draft of Normalized Yang Data Tree model."
[yangtools.git] / restconf / restconf-client-api / src / main / java / org / opendaylight / yangtools / restconf / client / api / RestconfClientContext.java
1 /*
2  * Copyright (c) 2014 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 package org.opendaylight.yangtools.restconf.client.api;
9
10 import java.util.Set;
11
12 import org.opendaylight.yangtools.restconf.client.api.data.ConfigurationDatastore;
13 import org.opendaylight.yangtools.restconf.client.api.data.OperationalDatastore;
14 import org.opendaylight.yangtools.restconf.client.api.event.EventStreamInfo;
15 import org.opendaylight.yangtools.restconf.client.api.event.ListenableEventStreamContext;
16 import org.opendaylight.yangtools.restconf.client.api.rpc.RpcServiceContext;
17 import org.opendaylight.yangtools.yang.binding.RpcService;
18
19 import com.google.common.util.concurrent.ListenableFuture;
20
21 public interface RestconfClientContext extends AutoCloseable {
22         /**
23          * Returns a set of {@link RpcServiceContext} which provides invocation
24          * handling for RPCs supported by the backing server.
25          *
26          * @return Future representing the asynchronous call to fetch the information.
27          */
28         ListenableFuture<Set<Class<? extends RpcService>>> getRpcServices();
29         <T extends RpcService> RpcServiceContext<T> getRpcServiceContext(Class<T> rpcService);
30
31         ListenableFuture<Set<EventStreamInfo>> getAvailableEventStreams();
32         ListenableEventStreamContext getEventStreamContext(EventStreamInfo info);
33
34         ConfigurationDatastore getConfigurationDatastore();
35         OperationalDatastore getOperationalDatastore();
36
37         @Override
38         void close();
39 }