List of usage examples for org.springframework.messaging.simp.user UserDestinationResult UserDestinationResult
public UserDestinationResult(String sourceDestination, Set<String> targetDestinations,
String subscribeDestination, @Nullable String user)
From source file:org.springframework.messaging.simp.user.DefaultUserDestinationResolver.java
@Override @Nullable//from w ww. ja v a 2s . c o m public UserDestinationResult resolveDestination(Message<?> message) { ParseResult parseResult = parse(message); if (parseResult == null) { return null; } String user = parseResult.getUser(); String sourceDestination = parseResult.getSourceDestination(); Set<String> targetSet = new HashSet<>(); for (String sessionId : parseResult.getSessionIds()) { String actualDestination = parseResult.getActualDestination(); String targetDestination = getTargetDestination(sourceDestination, actualDestination, sessionId, user); if (targetDestination != null) { targetSet.add(targetDestination); } } String subscribeDestination = parseResult.getSubscribeDestination(); return new UserDestinationResult(sourceDestination, targetSet, subscribeDestination, user); }