Remove unused constructor arg from UserDestinationMH
This commit is contained in:
parent
499c858cd4
commit
8ee2a2d18c
|
@ -231,7 +231,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
|
|||
@Bean
|
||||
public UserDestinationMessageHandler userDestinationMessageHandler() {
|
||||
UserDestinationMessageHandler handler = new UserDestinationMessageHandler(
|
||||
clientInboundChannel(), clientOutboundChannel(), brokerChannel(), userDestinationResolver());
|
||||
clientInboundChannel(), brokerChannel(), userDestinationResolver());
|
||||
return handler;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
|
@ -23,7 +23,6 @@ import org.apache.commons.logging.LogFactory;
|
|||
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
@ -49,8 +48,6 @@ public class UserDestinationMessageHandler implements MessageHandler, SmartLifec
|
|||
|
||||
private final SubscribableChannel clientInboundChannel;
|
||||
|
||||
private final MessageChannel clientOutboundChannel;
|
||||
|
||||
private final SubscribableChannel brokerChannel;
|
||||
|
||||
private final MessageSendingOperations<String> brokerMessagingTemplate;
|
||||
|
@ -66,20 +63,17 @@ public class UserDestinationMessageHandler implements MessageHandler, SmartLifec
|
|||
* Create an instance of the handler with the given messaging template and a
|
||||
* user destination resolver.
|
||||
* @param clientInChannel the channel for receiving messages from clients (e.g. WebSocket clients)
|
||||
* @param clientOutChannel the channel for sending messages to clients (e.g. WebSocket clients)
|
||||
* @param brokerChannel the channel for sending messages with translated user destinations
|
||||
* @param userDestinationResolver the resolver to use to find queue suffixes for a user
|
||||
*/
|
||||
public UserDestinationMessageHandler(SubscribableChannel clientInChannel, MessageChannel clientOutChannel,
|
||||
public UserDestinationMessageHandler(SubscribableChannel clientInChannel,
|
||||
SubscribableChannel brokerChannel, UserDestinationResolver userDestinationResolver) {
|
||||
|
||||
Assert.notNull(clientInChannel, "'clientInChannel' must not be null");
|
||||
Assert.notNull(clientOutChannel, "'clientOutChannel' must not be null");
|
||||
Assert.notNull(brokerChannel, "'brokerChannel' must not be null");
|
||||
Assert.notNull(userDestinationResolver, "DestinationResolver must not be null");
|
||||
|
||||
this.clientInboundChannel = clientInChannel;
|
||||
this.clientOutboundChannel = clientOutChannel;
|
||||
this.brokerChannel = brokerChannel;
|
||||
this.brokerMessagingTemplate = new SimpMessagingTemplate(brokerChannel);
|
||||
this.userDestinationResolver = userDestinationResolver;
|
||||
|
|
|
@ -53,8 +53,7 @@ public class UserDestinationMessageHandlerTests {
|
|||
MockitoAnnotations.initMocks(this);
|
||||
this.registry = new DefaultUserSessionRegistry();
|
||||
DefaultUserDestinationResolver resolver = new DefaultUserDestinationResolver(this.registry);
|
||||
this.messageHandler = new UserDestinationMessageHandler(new StubMessageChannel(),
|
||||
new StubMessageChannel(), this.brokerChannel, resolver);
|
||||
this.messageHandler = new UserDestinationMessageHandler(new StubMessageChannel(), this.brokerChannel, resolver);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -435,9 +435,8 @@ class MessageBrokerBeanDefinitionParser implements BeanDefinitionParser {
|
|||
|
||||
ConstructorArgumentValues cavs = new ConstructorArgumentValues();
|
||||
cavs.addIndexedArgumentValue(0, clientInChannelDef);
|
||||
cavs.addIndexedArgumentValue(1, clientOutChannelDef);
|
||||
cavs.addIndexedArgumentValue(2, brokerChannelDef);
|
||||
cavs.addIndexedArgumentValue(3, userDestinationResolverRef);
|
||||
cavs.addIndexedArgumentValue(1, brokerChannelDef);
|
||||
cavs.addIndexedArgumentValue(2, userDestinationResolverRef);
|
||||
|
||||
RootBeanDefinition userDestinationMessageHandlerDef =
|
||||
new RootBeanDefinition(UserDestinationMessageHandler.class, cavs, null);
|
||||
|
|
Loading…
Reference in New Issue