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.streams;
11 import javax.ws.rs.core.Application;
12 import org.opendaylight.restconf.server.spi.RestconfStream;
15 * JAX-RS binding for Server-Sent Events.
17 final class SSEApplication extends Application {
18 private final SSEStreamService singleton;
20 SSEApplication(final RestconfStream.Registry streamRegistry, final PingExecutor pingExecutor,
21 final StreamsConfiguration configuration) {
22 singleton = new SSEStreamService(streamRegistry, pingExecutor, configuration);
26 public Set<Object> getSingletons() {
27 return Set.of(singleton);