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.FutureCallback;
11 import io.netty.handler.codec.http.FullHttpRequest;
12 import io.netty.handler.codec.http.FullHttpResponse;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
16 * Functional interface for HTTP request dispatcher.
20 public interface RequestDispatcher {
22 * Performs {@link FullHttpRequest} processing. Any error occurred is expected either to be returned within
23 * {@link FullHttpResponse} with appropriate HTTP status code or set as future cause. Note that
25 * @param request HTTP request
26 * @param callback invoked when the request completes
28 void dispatch(FullHttpRequest request, FutureCallback<FullHttpResponse> callback);