Remove isStreaming flag from AbstractHttpSockJsSession
This change removes the need for the isStreaming field from the base class AbstractHttpSockJsSession. This field was used to account for differences between polling vs streaming SockJS sessions without having to expose to sub-classes private fields that are otherwise protected from concurrent access by the base class. The change manages to delegate to sub-classes without providing direct access to protected fields. Issue: SPR-12427
This commit is contained in:
@@ -102,7 +102,7 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
|
||||
}
|
||||
|
||||
|
||||
static class TestAbstractHttpSockJsSession extends AbstractHttpSockJsSession {
|
||||
static class TestAbstractHttpSockJsSession extends StreamingSockJsSession {
|
||||
|
||||
private IOException exceptionOnWriteFrame;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.http.server.ServerHttpRequest;
|
||||
import org.springframework.http.server.ServerHttpResponse;
|
||||
import org.springframework.web.socket.CloseStatus;
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.sockjs.SockJsTransportFailureException;
|
||||
@@ -30,7 +32,7 @@ import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig;
|
||||
/**
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class TestHttpSockJsSession extends AbstractHttpSockJsSession {
|
||||
public class TestHttpSockJsSession extends StreamingSockJsSession {
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user