Switch to Reactor 2022.0.0 snapshots
See gh-28766
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -66,10 +66,6 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
@Nullable
|
||||
private final Sinks.Empty<Void> handlerCompletionSink;
|
||||
|
||||
@Nullable
|
||||
@SuppressWarnings("deprecation")
|
||||
private final reactor.core.publisher.MonoProcessor<Void> handlerCompletionMono;
|
||||
|
||||
private final WebSocketReceivePublisher receivePublisher;
|
||||
|
||||
@Nullable
|
||||
@@ -90,7 +86,7 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
public AbstractListenerWebSocketSession(
|
||||
T delegate, String id, HandshakeInfo info, DataBufferFactory bufferFactory) {
|
||||
|
||||
this(delegate, id, info, bufferFactory, (Sinks.Empty<Void>) null);
|
||||
this(delegate, id, info, bufferFactory, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -105,25 +101,6 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
super(delegate, id, info, bufferFactory);
|
||||
this.receivePublisher = new WebSocketReceivePublisher();
|
||||
this.handlerCompletionSink = handlerCompletionSink;
|
||||
this.handlerCompletionMono = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alternative constructor with completion MonoProcessor to use to signal
|
||||
* when the handling of the session is complete, with success or error.
|
||||
* <p>Primarily for use with {@code WebSocketClient} to be able to
|
||||
* communicate the end of handling.
|
||||
* @deprecated as of 5.3 in favor of
|
||||
* {@link #AbstractListenerWebSocketSession(Object, String, HandshakeInfo, DataBufferFactory, Sinks.Empty)}
|
||||
*/
|
||||
@Deprecated
|
||||
public AbstractListenerWebSocketSession(T delegate, String id, HandshakeInfo info,
|
||||
DataBufferFactory bufferFactory, @Nullable reactor.core.publisher.MonoProcessor<Void> handlerCompletion) {
|
||||
|
||||
super(delegate, id, info, bufferFactory);
|
||||
this.receivePublisher = new WebSocketReceivePublisher();
|
||||
this.handlerCompletionMono = handlerCompletion;
|
||||
this.handlerCompletionSink = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -244,9 +221,6 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
// Ignore result: can't overflow, ok if not first or no one listens
|
||||
this.handlerCompletionSink.tryEmitError(ex);
|
||||
}
|
||||
if (this.handlerCompletionMono != null) {
|
||||
this.handlerCompletionMono.onError(ex);
|
||||
}
|
||||
close(CloseStatus.SERVER_ERROR.withReason(ex.getMessage()));
|
||||
}
|
||||
|
||||
@@ -256,9 +230,6 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
// Ignore result: can't overflow, ok if not first or no one listens
|
||||
this.handlerCompletionSink.tryEmitEmpty();
|
||||
}
|
||||
if (this.handlerCompletionMono != null) {
|
||||
this.handlerCompletionMono.onComplete();
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,7 +50,7 @@ public class JettyWebSocketSession extends AbstractListenerWebSocketSession<Sess
|
||||
|
||||
|
||||
public JettyWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory) {
|
||||
this(session, info, factory, (Sinks.Empty<Void>) null);
|
||||
this(session, info, factory, null);
|
||||
}
|
||||
|
||||
public JettyWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory,
|
||||
@@ -61,13 +61,6 @@ public class JettyWebSocketSession extends AbstractListenerWebSocketSession<Sess
|
||||
// suspendReceiving();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public JettyWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory,
|
||||
@Nullable reactor.core.publisher.MonoProcessor<Void> completionMono) {
|
||||
|
||||
super(session, ObjectUtils.getIdentityHexString(session), info, factory, completionMono);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canSuspendReceiving() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
public class StandardWebSocketSession extends AbstractListenerWebSocketSession<Session> {
|
||||
|
||||
public StandardWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory) {
|
||||
this(session, info, factory, (Sinks.Empty<Void>) null);
|
||||
this(session, info, factory, null);
|
||||
}
|
||||
|
||||
public StandardWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory,
|
||||
@@ -55,13 +55,6 @@ public class StandardWebSocketSession extends AbstractListenerWebSocketSession<S
|
||||
super(session, session.getId(), info, factory, completionSink);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public StandardWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory,
|
||||
@Nullable reactor.core.publisher.MonoProcessor<Void> completionMono) {
|
||||
|
||||
super(session, session.getId(), info, factory, completionMono);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canSuspendReceiving() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,14 +53,6 @@ public class TomcatWebSocketSession extends StandardWebSocketSession {
|
||||
suspendReceiving();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public TomcatWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory,
|
||||
reactor.core.publisher.MonoProcessor<Void> completionMono) {
|
||||
|
||||
super(session, info, factory, completionMono);
|
||||
suspendReceiving();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canSuspendReceiving() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,7 +48,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
public class UndertowWebSocketSession extends AbstractListenerWebSocketSession<WebSocketChannel> {
|
||||
|
||||
public UndertowWebSocketSession(WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory) {
|
||||
this(channel, info, factory, (Sinks.Empty<Void>) null);
|
||||
this(channel, info, factory, null);
|
||||
}
|
||||
|
||||
public UndertowWebSocketSession(WebSocketChannel channel, HandshakeInfo info,
|
||||
@@ -58,14 +58,6 @@ public class UndertowWebSocketSession extends AbstractListenerWebSocketSession<W
|
||||
suspendReceiving();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public UndertowWebSocketSession(WebSocketChannel channel, HandshakeInfo info,
|
||||
DataBufferFactory factory, @Nullable reactor.core.publisher.MonoProcessor<Void> completionMono) {
|
||||
|
||||
super(channel, ObjectUtils.getIdentityHexString(channel), info, factory, completionMono);
|
||||
suspendReceiving();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canSuspendReceiving() {
|
||||
|
||||
Reference in New Issue
Block a user