Skip to content

Commit 8a8501a

Browse files
committed
Polish
1 parent 329fbf3 commit 8a8501a

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/handler/SimpleBrokerMessageHandler.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,17 @@ public class SimpleBrokerMessageHandler implements MessageHandler {
3737

3838
private static final Log logger = LogFactory.getLog(SimpleBrokerMessageHandler.class);
3939

40-
private final MessageChannel outboundChannel;
40+
private final MessageChannel messageChannel;
4141

4242
private SubscriptionRegistry subscriptionRegistry = new DefaultSubscriptionRegistry();
4343

4444

4545
/**
46-
* @param outboundChannel the channel to which messages for clients should be sent
47-
* @param observable an Observable to use to manage subscriptions
46+
* @param messageChannel the channel to broadcast messages to
4847
*/
49-
public SimpleBrokerMessageHandler(MessageChannel outboundChannel) {
50-
Assert.notNull(outboundChannel, "outboundChannel is required");
51-
this.outboundChannel = outboundChannel;
48+
public SimpleBrokerMessageHandler(MessageChannel messageChannel) {
49+
Assert.notNull(messageChannel, "messageChannel is required");
50+
this.messageChannel = messageChannel;
5251
}
5352

5453

@@ -104,7 +103,7 @@ protected void sendMessageToSubscribers(String destination, Message<?> message)
104103
Object payload = message.getPayload();
105104
Message<?> clientMessage = MessageBuilder.withPayloadAndHeaders(payload, headers).build();
106105
try {
107-
this.outboundChannel.send(clientMessage);
106+
this.messageChannel.send(clientMessage);
108107
}
109108
catch (Throwable ex) {
110109
logger.error("Failed to send message to destination=" + destination +

spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class StompBrokerRelayMessageHandler implements MessageHandler, SmartLife
5757

5858
private static final String STOMP_RELAY_SYSTEM_SESSION_ID = "stompRelaySystemSessionId";
5959

60-
private final MessageChannel outboundChannel;
60+
private final MessageChannel messageChannel;
6161

6262
private final String[] destinationPrefixes;
6363

@@ -83,14 +83,14 @@ public class StompBrokerRelayMessageHandler implements MessageHandler, SmartLife
8383

8484

8585
/**
86-
* @param outboundChannel a channel for messages going out to clients
86+
* @param messageChannel the channel to send messages from the STOMP broker to
8787
* @param destinationPrefixes the broker supported destination prefixes; destinations
8888
* that do not match the given prefix are ignored.
8989
*/
90-
public StompBrokerRelayMessageHandler(MessageChannel outboundChannel, Collection<String> destinationPrefixes) {
91-
Assert.notNull(outboundChannel, "outboundChannel is required");
90+
public StompBrokerRelayMessageHandler(MessageChannel messageChannel, Collection<String> destinationPrefixes) {
91+
Assert.notNull(messageChannel, "messageChannel is required");
9292
Assert.notNull(destinationPrefixes, "destinationPrefixes is required");
93-
this.outboundChannel = outboundChannel;
93+
this.messageChannel = messageChannel;
9494
this.destinationPrefixes = destinationPrefixes.toArray(new String[destinationPrefixes.size()]);
9595
}
9696

@@ -411,7 +411,7 @@ private void readStompFrame(String stompFrame) {
411411
}
412412

413413
protected void sendMessageToClient(Message<?> message) {
414-
outboundChannel.send(message);
414+
messageChannel.send(message);
415415
}
416416

417417
private void sendError(String sessionId, String errorText) {

0 commit comments

Comments
 (0)