Merge branch '6.2.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -20,7 +20,6 @@ import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -275,12 +274,10 @@ public class UserDestinationMessageHandler implements MessageHandler, SmartLifec
|
||||
return this.messagingTemplate;
|
||||
}
|
||||
|
||||
public void send(UserDestinationResult destinationResult, Message<?> message) throws MessagingException {
|
||||
Set<String> sessionIds = destinationResult.getSessionIds();
|
||||
Iterator<String> itr = (sessionIds != null ? sessionIds.iterator() : null);
|
||||
|
||||
for (String target : destinationResult.getTargetDestinations()) {
|
||||
String sessionId = (itr != null ? itr.next() : null);
|
||||
public void send(UserDestinationResult result, Message<?> message) throws MessagingException {
|
||||
Iterator<String> itr = result.getSessionIds().iterator();
|
||||
for (String target : result.getTargetDestinations()) {
|
||||
String sessionId = (itr.hasNext() ? itr.next() : null);
|
||||
getTemplateToUse(sessionId).send(target, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -44,7 +44,11 @@ public class UserDestinationResult {
|
||||
private final Set<String> sessionIds;
|
||||
|
||||
|
||||
public UserDestinationResult(String sourceDestination, Set<String> targetDestinations,
|
||||
/**
|
||||
* Main constructor.
|
||||
*/
|
||||
public UserDestinationResult(
|
||||
String sourceDestination, Set<String> targetDestinations,
|
||||
String subscribeDestination, @Nullable String user) {
|
||||
|
||||
this(sourceDestination, targetDestinations, subscribeDestination, user, null);
|
||||
@@ -113,7 +117,7 @@ public class UserDestinationResult {
|
||||
/**
|
||||
* Return the session id for the targetDestination.
|
||||
*/
|
||||
public @Nullable Set<String> getSessionIds() {
|
||||
public Set<String> getSessionIds() {
|
||||
return this.sessionIds;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user