2 * Copyright (c) 2020 Lumina Networks, Inc. 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.restconf.nb.rfc8040.services.wrapper;
10 import javax.ws.rs.Path;
11 import javax.ws.rs.core.UriInfo;
12 import org.glassfish.jersey.media.sse.EventOutput;
13 import org.opendaylight.restconf.nb.rfc8040.rests.services.api.RestconfDataStreamService;
14 import org.opendaylight.restconf.nb.rfc8040.rests.services.impl.RestconfDataStreamServiceImpl;
15 import org.opendaylight.restconf.nb.rfc8040.streams.sse.SSEInitializer;
18 * Wrapper for service.
20 * <li>{@link RestconfDataStreamService}
24 public final class ServicesNotifWrapper implements RestconfDataStreamService {
26 private final RestconfDataStreamService delegRestStream;
28 private ServicesNotifWrapper(RestconfDataStreamService delegRestStream) {
29 this.delegRestStream = delegRestStream;
32 public static ServicesNotifWrapper newInstance(SSEInitializer configuration) {
33 RestconfDataStreamService delegRestStream = new RestconfDataStreamServiceImpl(configuration);
34 return new ServicesNotifWrapper(delegRestStream);
38 public EventOutput getSSE(String identifier, UriInfo uriInfo) {
39 return this.delegRestStream.getSSE(identifier, uriInfo);