Skip to content

Commit 23c379d

Browse files
committed
Order setter for DefaultSimpUserRegistry
Issue: SPR-17023
1 parent 36bbbab commit 23c379d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spring-websocket/src/main/java/org/springframework/web/socket/messaging/DefaultSimpUserRegistry.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
*/
4848
public class DefaultSimpUserRegistry implements SimpUserRegistry, SmartApplicationListener {
4949

50+
private int order = Ordered.LOWEST_PRECEDENCE;
51+
5052
/* Primary lookup that holds all users and their sessions */
5153
private final Map<String, LocalSimpUser> users = new ConcurrentHashMap<>();
5254

@@ -56,9 +58,13 @@ public class DefaultSimpUserRegistry implements SimpUserRegistry, SmartApplicati
5658
private final Object sessionLock = new Object();
5759

5860

61+
public void setOrder(int order) {
62+
this.order = order;
63+
}
64+
5965
@Override
6066
public int getOrder() {
61-
return Ordered.LOWEST_PRECEDENCE;
67+
return this.order;
6268
}
6369

6470

0 commit comments

Comments
 (0)