Polishing

This commit is contained in:
Juergen Hoeller
2021-02-26 17:49:10 +01:00
parent c084936870
commit 4af7a6863b
2 changed files with 9 additions and 9 deletions

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.reactive.socket.server.support;
import java.util.function.BiPredicate;
@@ -22,16 +23,15 @@ import org.springframework.web.server.ServerWebExchange;
/**
* A predicate for use with
* {@link org.springframework.web.reactive.handler.AbstractUrlHandlerMapping#setHandlerPredicate(BiPredicate)}
* to ensure only WebSocket handshake requests are matched to handlers of
* type {@link WebSocketHandler}.
* {@link org.springframework.web.reactive.handler.AbstractUrlHandlerMapping#setHandlerPredicate}
* to ensure only WebSocket handshake requests are matched to handlers of type
* {@link WebSocketHandler}.
*
* @author Rossen Stoyanchev
* @since 5.3.5
*/
public class WebSocketUpgradeHandlerPredicate implements BiPredicate<Object, ServerWebExchange> {
@Override
public boolean test(Object handler, ServerWebExchange exchange) {
if (handler instanceof WebSocketHandler) {