com.github.linyuzai.connection.loadbalance.sse.reactive.ReactiveSseServerEndpoint Maven / Gradle / Ivy
The newest version!
package com.github.linyuzai.connection.loadbalance.sse.reactive;
import com.github.linyuzai.connection.loadbalance.core.concept.Connection;
import com.github.linyuzai.connection.loadbalance.sse.concept.*;
import lombok.RequiredArgsConstructor;
import org.reactivestreams.Publisher;
import org.springframework.http.codec.ServerSentEvent;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;
import reactor.core.publisher.FluxSink;
import reactor.core.publisher.Mono;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("${concept.sse.server.default-endpoint.prefix:concept-sse}")
@RequiredArgsConstructor
public class ReactiveSseServerEndpoint {
private final SseIdGenerator sseIdGenerator;
private final SseFluxFactory sseFluxFactory;
private final SseLoadBalanceConcept concept;
private final List interceptors;
@GetMapping("{path}")
public Publisher> defaultEndpoint(@PathVariable String path,
@RequestParam Map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy