com.github.linyuzai.connection.loadbalance.sse.servlet.ServletSseServerEndpoint Maven / Gradle / Ivy
The newest version!
package com.github.linyuzai.connection.loadbalance.sse.servlet;
import com.github.linyuzai.connection.loadbalance.core.concept.Connection;
import com.github.linyuzai.connection.loadbalance.sse.concept.*;
import lombok.RequiredArgsConstructor;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.http.server.ServletServerHttpResponse;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("${concept.sse.server.default-endpoint.prefix:concept-sse}")
@RequiredArgsConstructor
public class ServletSseServerEndpoint {
private final SseIdGenerator sseIdGenerator;
private final SseEmitterFactory sseEmitterFactory;
private final SseLoadBalanceConcept concept;
private final List interceptors;
@GetMapping("{path}")
public SseEmitter defaultEndpoint(@PathVariable String path,
@RequestParam Map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy