4a6d6fe30cb74b4ef6d75b7a6d516fb10543f6da
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / api / RestconfDataStreamService.java
1 /*
2  * Copyright (c) 2020 Lumina Networks, Inc. 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.nb.rfc8040.rests.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.Produces;
15 import javax.ws.rs.core.Context;
16 import javax.ws.rs.core.MediaType;
17 import javax.ws.rs.core.UriInfo;
18 import org.glassfish.jersey.media.sse.EventOutput;
19
20 public interface RestconfDataStreamService {
21     /**
22      * Get target data resource.
23      *
24      * @param identifier
25      *            path to target
26      * @param uriInfo
27      *            URI info
28      * @return {@link EventOutput}
29      */
30     @GET
31     @Path("/{identifier:.+}")
32     @Produces(MediaType.SERVER_SENT_EVENTS)
33     EventOutput getSSE(@Encoded @PathParam("identifier") String identifier, @Context UriInfo uriInfo);
34
35 }