Rework body formatting wiring
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / rfc8040 / streams / RestconfStreamServletFactory.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others.  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.streams;
9
10 import javax.servlet.http.HttpServlet;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.restconf.api.query.PrettyPrintParam;
13 import org.opendaylight.restconf.server.spi.RestconfStream;
14
15 /**
16  * A helper for creating {@link HttpServlet}s which provide bridge between JAX-RS and {@link RestconfStream.Registry}.
17  *
18  * @deprecated This interface exists only to support SSE/Websocket delivery. It will be removed when support for
19  *             WebSockets is removed.
20  */
21 @Deprecated(since = "7.0.0", forRemoval = true)
22 public interface RestconfStreamServletFactory {
23     /**
24      * Return the value of {@code {+restconf}} macro. May be empty, guaranteed to not end with {@code /}.
25      *
26      * @return the value of {@code {+restconf}} macro
27      */
28     @NonNull String restconf();
29
30     @NonNull HttpServlet newStreamServlet();
31
32     @NonNull PrettyPrintParam prettyPrint();
33 }