Deprecate writePrelude in AbstractHttpSockJsSession

A logical follow-up on commit 43d937, this change also removes (or
rather deprecates for now) writePrelude that is only of concern to
streaming SockJS session implementations.

Issue: SPR-12427
This commit is contained in:
Rossen Stoyanchev
2015-01-13 10:26:59 -05:00
parent 43d93712f1
commit ab629a0e26
8 changed files with 42 additions and 38 deletions

View File

@@ -118,13 +118,8 @@ public class HttpSockJsSessionTests extends AbstractSockJsSessionTests<TestAbstr
}
@Override
protected boolean isStreaming() {
return true;
}
@Override
protected void writePrelude(ServerHttpRequest request, ServerHttpResponse response) throws IOException {
response.getBody().write("hhh\n".getBytes());
protected byte[] getPrelude(ServerHttpRequest request) {
return "hhh\n".getBytes();
}
public boolean wasCacheFlushed() {

View File

@@ -22,7 +22,6 @@ 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;
@@ -56,8 +55,8 @@ public class TestHttpSockJsSession extends StreamingSockJsSession {
}
@Override
protected boolean isStreaming() {
return true;
protected byte[] getPrelude(ServerHttpRequest request) {
return new byte[0];
}
@Override