2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.mielecloud.internal.webservice.sse;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.eclipse.jetty.client.api.Request;
20 * Factory that produces configured {@link Request} instances for usage with SSE.
22 * @author Björn Lange - Initial Contribution
26 public interface SseRequestFactory {
28 * Produces a {@link Request} which is decorated with all required headers.
30 * @param endpoint The endpoint to connect to.
31 * @return The created {@link Request} or {@code null} if no request can be created due to lacking request
32 * information. If this method returns {@code null} then all connection attempts will be cancelled.
35 Request createSseRequest(String endpoint);