Search in sources :

Example 1 with MultiServerUserRegistry

use of org.springframework.messaging.simp.user.MultiServerUserRegistry in project spring-framework by spring-projects.

the class AbstractMessageBrokerConfiguration method userRegistry.

@Bean
public SimpUserRegistry userRegistry(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel) {
    MessageBrokerRegistry brokerRegistry = getBrokerRegistry(clientInboundChannel, clientOutboundChannel);
    SimpUserRegistry userRegistry = createLocalUserRegistry(brokerRegistry.getUserRegistryOrder());
    boolean broadcast = brokerRegistry.getUserRegistryBroadcast() != null;
    return (broadcast ? new MultiServerUserRegistry(userRegistry) : userRegistry);
}
Also used : MultiServerUserRegistry(org.springframework.messaging.simp.user.MultiServerUserRegistry) SimpUserRegistry(org.springframework.messaging.simp.user.SimpUserRegistry) Bean(org.springframework.context.annotation.Bean)

Aggregations

Bean (org.springframework.context.annotation.Bean)1 MultiServerUserRegistry (org.springframework.messaging.simp.user.MultiServerUserRegistry)1 SimpUserRegistry (org.springframework.messaging.simp.user.SimpUserRegistry)1