org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry Java Examples
The following examples show how to use
org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MessageBrokerConfigurationTests.java From spring-analysis-note with MIT License | 6 votes |
@Test public void customPathMatcher() { ApplicationContext context = loadConfig(CustomConfig.class); SimpleBrokerMessageHandler broker = context.getBean(SimpleBrokerMessageHandler.class); DefaultSubscriptionRegistry registry = (DefaultSubscriptionRegistry) broker.getSubscriptionRegistry(); assertEquals("a.a", registry.getPathMatcher().combine("a", "a")); PathMatcher pathMatcher = context.getBean(SimpAnnotationMethodMessageHandler.class).getPathMatcher(); assertEquals("a.a", pathMatcher.combine("a", "a")); DefaultUserDestinationResolver resolver = context.getBean(DefaultUserDestinationResolver.class); assertNotNull(resolver); assertEquals(false, resolver.isRemoveLeadingSlash()); }
Example #2
Source File: MessageBrokerConfigurationTests.java From java-technology-stack with MIT License | 6 votes |
@Test public void customPathMatcher() { ApplicationContext context = loadConfig(CustomConfig.class); SimpleBrokerMessageHandler broker = context.getBean(SimpleBrokerMessageHandler.class); DefaultSubscriptionRegistry registry = (DefaultSubscriptionRegistry) broker.getSubscriptionRegistry(); assertEquals("a.a", registry.getPathMatcher().combine("a", "a")); PathMatcher pathMatcher = context.getBean(SimpAnnotationMethodMessageHandler.class).getPathMatcher(); assertEquals("a.a", pathMatcher.combine("a", "a")); DefaultUserDestinationResolver resolver = context.getBean(DefaultUserDestinationResolver.class); assertNotNull(resolver); assertEquals(false, resolver.isRemoveLeadingSlash()); }
Example #3
Source File: MessageBrokerConfigurationTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void customCacheLimit() { ApplicationContext context = loadConfig(CustomConfig.class); SimpleBrokerMessageHandler broker = context.getBean(SimpleBrokerMessageHandler.class); DefaultSubscriptionRegistry registry = (DefaultSubscriptionRegistry) broker.getSubscriptionRegistry(); assertEquals(8192, registry.getCacheLimit()); }
Example #4
Source File: MessageBrokerConfigurationTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void customCacheLimit() { ApplicationContext context = loadConfig(CustomConfig.class); SimpleBrokerMessageHandler broker = context.getBean(SimpleBrokerMessageHandler.class); DefaultSubscriptionRegistry registry = (DefaultSubscriptionRegistry) broker.getSubscriptionRegistry(); assertEquals(8192, registry.getCacheLimit()); }
Example #5
Source File: MessageBrokerConfigurationTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void customPathMatcher() { SimpleBrokerMessageHandler broker = this.customContext.getBean(SimpleBrokerMessageHandler.class); DefaultSubscriptionRegistry registry = (DefaultSubscriptionRegistry) broker.getSubscriptionRegistry(); assertEquals("a.a", registry.getPathMatcher().combine("a", "a")); SimpAnnotationMethodMessageHandler handler = this.customContext.getBean(SimpAnnotationMethodMessageHandler.class); assertEquals("a.a", handler.getPathMatcher().combine("a", "a")); }