Split Restconf implementations (draft02 and RFC) - Prepare modules
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / restconf / restful / services / api / RestconfStreamsSubscriptionService.java
1 /*
2  * Copyright (c) 2016 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.restconf.restful.services.api;
9
10 import javax.ws.rs.Encoded;
11 import javax.ws.rs.GET;
12 import javax.ws.rs.Path;
13 import javax.ws.rs.PathParam;
14 import javax.ws.rs.core.Context;
15 import javax.ws.rs.core.UriInfo;
16 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
17
18 /**
19  * Subscribing to streams.
20  *
21  */
22 public interface RestconfStreamsSubscriptionService {
23
24     /**
25      * Subscribing to receive notification from stream support.
26      *
27      * @param identifier
28      *             name of stream
29      * @param uriInfo
30      *             URI info
31      * @return {@link NormalizedNodeContext}
32      */
33     @GET
34     @Path("data/ietf-restconf-monitoring:restconf-state/streams/stream/{identifier:.+}")
35     NormalizedNodeContext subscribeToStream(@Encoded @PathParam("identifier") String identifier,
36             @Context UriInfo uriInfo);
37 }