Package org.springframework.messaging.support

Examples of org.springframework.messaging.support.AbstractSubscribableChannel



  private void testChannel(String channelName, List<Class<? extends  MessageHandler>> subscriberTypes,
      int interceptorCount) {

    AbstractSubscribableChannel channel = this.appContext.getBean(channelName, AbstractSubscribableChannel.class);

    for (Class<? extends  MessageHandler> subscriberType : subscriberTypes) {
      MessageHandler subscriber = this.appContext.getBean(subscriberType);
      assertNotNull("No subsription for " + subscriberType, subscriber);
      assertTrue(channel.hasSubscription(subscriber));
    }

    List<ChannelInterceptor> interceptors = channel.getInterceptors();
    assertEquals(interceptorCount, interceptors.size());
    assertEquals(ImmutableMessageChannelInterceptor.class, interceptors.get(interceptors.size()-1).getClass());
  }
View Full Code Here


    assertTrue(handlers.contains(brokerRelayContext.getBean(StompBrokerRelayMessageHandler.class)));
  }

  @Test
  public void clientInboundChannelCustomized() {
    AbstractSubscribableChannel channel = this.customContext.getBean(
        "clientInboundChannel", AbstractSubscribableChannel.class);

    assertEquals(3, channel.getInterceptors().size());

    CustomThreadPoolTaskExecutor taskExecutor = this.customContext.getBean(
        "clientInboundChannelExecutor", CustomThreadPoolTaskExecutor.class);

    assertEquals(11, taskExecutor.getCorePoolSize());
View Full Code Here

    assertEquals("bar", new String((byte[]) message.getPayload()));
  }

  @Test
  public void clientOutboundChannelCustomized() {
    AbstractSubscribableChannel channel = this.customContext.getBean(
        "clientOutboundChannel", AbstractSubscribableChannel.class);

    assertEquals(3, channel.getInterceptors().size());

    ThreadPoolTaskExecutor taskExecutor = this.customContext.getBean(
        "clientOutboundChannelExecutor", ThreadPoolTaskExecutor.class);

    assertEquals(21, taskExecutor.getCorePoolSize());
View Full Code Here

    assertEquals("/foo-users1", headers.getDestination());
  }

  @Test
  public void brokerChannelCustomized() {
    AbstractSubscribableChannel channel = this.customContext.getBean(
        "brokerChannel", AbstractSubscribableChannel.class);

    assertEquals(4, channel.getInterceptors().size());

    ThreadPoolTaskExecutor taskExecutor = this.customContext.getBean(
        "brokerChannelExecutor", ThreadPoolTaskExecutor.class);

    assertEquals(31, taskExecutor.getCorePoolSize());
View Full Code Here

TOP

Related Classes of org.springframework.messaging.support.AbstractSubscribableChannel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.