Polishing
This commit is contained in:
parent
5d7fb1a1c2
commit
dc55da0988
|
@ -44,12 +44,13 @@ import org.springframework.util.Assert;
|
||||||
* lifecycle of the listener containers, in particular within the lifecycle
|
* lifecycle of the listener containers, in particular within the lifecycle
|
||||||
* of the application context.
|
* of the application context.
|
||||||
*
|
*
|
||||||
* <p>Contrary to {@link MessageListenerContainer MessageListenerContainers} created manually, listener
|
* <p>Contrary to {@link MessageListenerContainer MessageListenerContainers}
|
||||||
* containers managed by registry are not beans in the application context and
|
* created manually, listener containers managed by registry are not beans
|
||||||
* are not candidates for autowiring. Use {@link #getListenerContainers()} if
|
* in the application context and are not candidates for autowiring.
|
||||||
* you need to access this registry's listener containers for management purposes.
|
* Use {@link #getListenerContainers()} if you need to access this registry's
|
||||||
* If you need to access to a specific message listener container, use
|
* listener containers for management purposes. If you need to access to a
|
||||||
* {@link #getListenerContainer(String)} with the id of the endpoint.
|
* specific message listener container, use {@link #getListenerContainer(String)}
|
||||||
|
* with the id of the endpoint.
|
||||||
*
|
*
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
|
|
@ -251,7 +251,7 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure a {@link MessageHeaderInitializer} to pass on to
|
* Configure a {@link MessageHeaderInitializer} to pass on to
|
||||||
* {@link org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandlers}
|
* {@link HandlerMethodReturnValueHandler HandlerMethodReturnValueHandlers}
|
||||||
* that send messages from controller return values.
|
* that send messages from controller return values.
|
||||||
* <p>By default, this property is not set.
|
* <p>By default, this property is not set.
|
||||||
*/
|
*/
|
||||||
|
@ -332,7 +332,8 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
|
||||||
|
|
||||||
// Annotation-based return value types
|
// Annotation-based return value types
|
||||||
|
|
||||||
SendToMethodReturnValueHandler sendToHandler = new SendToMethodReturnValueHandler(this.brokerTemplate, true);
|
SendToMethodReturnValueHandler sendToHandler =
|
||||||
|
new SendToMethodReturnValueHandler(this.brokerTemplate, true);
|
||||||
sendToHandler.setHeaderInitializer(this.headerInitializer);
|
sendToHandler.setHeaderInitializer(this.headerInitializer);
|
||||||
handlers.add(sendToHandler);
|
handlers.add(sendToHandler);
|
||||||
|
|
||||||
|
@ -341,10 +342,11 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
|
||||||
subscriptionHandler.setHeaderInitializer(this.headerInitializer);
|
subscriptionHandler.setHeaderInitializer(this.headerInitializer);
|
||||||
handlers.add(subscriptionHandler);
|
handlers.add(subscriptionHandler);
|
||||||
|
|
||||||
// custom return value types
|
// Custom return value types
|
||||||
|
|
||||||
handlers.addAll(getCustomReturnValueHandlers());
|
handlers.addAll(getCustomReturnValueHandlers());
|
||||||
|
|
||||||
// catch-all
|
// Catch-all
|
||||||
|
|
||||||
sendToHandler = new SendToMethodReturnValueHandler(this.brokerTemplate, false);
|
sendToHandler = new SendToMethodReturnValueHandler(this.brokerTemplate, false);
|
||||||
sendToHandler.setHeaderInitializer(this.headerInitializer);
|
sendToHandler.setHeaderInitializer(this.headerInitializer);
|
||||||
|
|
Loading…
Reference in New Issue