Fix nullability warnings and javadoc-triggered package cycles
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -26,13 +26,12 @@ import java.lang.annotation.Target;
|
||||
* Annotation that indicates a method parameter should be bound to a template variable
|
||||
* in a destination template string. Supported on message handling methods such as
|
||||
* {@link MessageMapping @MessageMapping}.
|
||||
* <p>
|
||||
* A {@code @DestinationVariable} template variable is always required.
|
||||
*
|
||||
* <p>A {@code @DestinationVariable} template variable is always required.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.0
|
||||
*
|
||||
* @see org.springframework.messaging.handler.annotation.MessageMapping
|
||||
* @see org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.simp.annotation.SendToUser;
|
||||
|
||||
/**
|
||||
* Annotation for mapping a {@link Message} onto a message-handling method by
|
||||
@@ -65,11 +64,11 @@ import org.springframework.messaging.simp.annotation.SendToUser;
|
||||
* authenticated user.</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p>How the return value is handled depends on the processing scenario.
|
||||
* For STOMP over WebSocket, it is turned into a message and sent to a default
|
||||
* response destination or to a custom destination specified with an
|
||||
* {@link SendTo @SendTo} or {@link SendToUser @SendToUser} annotation.
|
||||
* For RSocket, the response is used to reply to the stream request.
|
||||
* <p>How the return value is handled depends on the processing scenario. For
|
||||
* STOMP over WebSocket, it is turned into a message and sent to a default response
|
||||
* destination or to a custom destination specified with an {@link SendTo @SendTo}
|
||||
* or {@link org.springframework.messaging.simp.annotation.SendToUser @SendToUser}
|
||||
* annotation. For RSocket, the response is used to reply to the stream request.
|
||||
*
|
||||
* <p>Specializations of this annotation including
|
||||
* {@link org.springframework.messaging.simp.annotation.SubscribeMapping @SubscribeMapping} or
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.springframework.util.RouteMatcher;
|
||||
*/
|
||||
class DefaultClientResponderFactory implements ClientResponderFactory, ClientResponderFactory.Config {
|
||||
|
||||
@Nullable
|
||||
private List<Object> handlers;
|
||||
|
||||
@Nullable
|
||||
@@ -52,9 +53,10 @@ class DefaultClientResponderFactory implements ClientResponderFactory, ClientRes
|
||||
@Nullable
|
||||
private ArgumentResolverConfigurer argumentResolverConfigurer;
|
||||
|
||||
|
||||
@Override
|
||||
public ClientResponderFactory handlers(Object... handlers) {
|
||||
Assert.notEmpty(handlers, "handlers should not be empty");
|
||||
Assert.notEmpty(handlers, "Handlers array must not be empty");
|
||||
this.handlers = Arrays.asList(handlers);
|
||||
return this;
|
||||
}
|
||||
@@ -89,9 +91,10 @@ class DefaultClientResponderFactory implements ClientResponderFactory, ClientRes
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void accept(RSocketFactory.ClientRSocketFactory clientRSocketFactory) {
|
||||
Assert.notEmpty(this.handlers, "handlers should not be empty");
|
||||
Assert.state(this.handlers != null, "No handlers set");
|
||||
RSocketMessageHandler messageHandler = new RSocketMessageHandler();
|
||||
messageHandler.setHandlers(this.handlers);
|
||||
if (this.strategies != null) {
|
||||
|
||||
Reference in New Issue
Block a user