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 javax.ws.rs.sse.Sse;
13 import javax.ws.rs.sse.SseEventSink;
14 import org.opendaylight.restconf.nb.rfc8040.rests.services.api.RestconfDataStreamService;
15 import org.opendaylight.restconf.nb.rfc8040.rests.services.impl.RestconfDataStreamServiceImpl;
16 import org.opendaylight.restconf.nb.rfc8040.streams.sse.SSEInitializer;
19 * Wrapper for service.
21 * <li>{@link RestconfDataStreamService}
25 public final class ServicesNotifWrapper implements RestconfDataStreamService {
27 private final RestconfDataStreamService delegRestStream;
29 private ServicesNotifWrapper(final RestconfDataStreamService delegRestStream) {
30 this.delegRestStream = delegRestStream;
33 public static ServicesNotifWrapper newInstance(final SSEInitializer configuration) {
34 RestconfDataStreamService delegRestStream = new RestconfDataStreamServiceImpl(configuration);
35 return new ServicesNotifWrapper(delegRestStream);
39 public void getSSE(final String identifier, final UriInfo uriInfo, final SseEventSink sink, final Sse sse) {
40 this.delegRestStream.getSSE(identifier, uriInfo, sink, sse);