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;
11 import javax.ws.rs.core.Application;
12 import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
13 import org.opendaylight.restconf.nb.rfc8040.rests.services.impl.RestconfDataStreamServiceImpl;
14 import org.opendaylight.restconf.nb.rfc8040.streams.ListenersBroker;
15 import org.opendaylight.restconf.nb.rfc8040.streams.StreamsConfiguration;
18 * JAX-RS binding for Server-Sent Events.
20 final class ServerSentEventsApplication extends Application {
21 private final RestconfDataStreamServiceImpl singleton;
23 ServerSentEventsApplication(final ScheduledThreadPool scheduledThreadPool, final ListenersBroker listenersBroker,
24 final StreamsConfiguration configuration) {
25 singleton = new RestconfDataStreamServiceImpl(scheduledThreadPool, listenersBroker, configuration);
29 public Set<Object> getSingletons() {
30 return Set.of(singleton);