2 * Copyright (c) 2024 PANTHEON.tech s.r.o. and others. 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.netconf.transport.http;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import io.netty.handler.codec.http.FullHttpRequest;
12 import io.netty.handler.codec.http.FullHttpResponse;
15 * Functional interface for HTTP request dispatcher.
18 public interface RequestDispatcher {
21 * Performs {@link FullHttpRequest} processing. Any error occurred is expected either to be returned within
22 * {@link FullHttpResponse} with appropriate HTTP status code or set as future cause.
24 * @param request http request
25 * @return future providing http response or cause in case of error.
27 ListenableFuture<FullHttpResponse> dispatch(FullHttpRequest request);