Package org.springframework.xd.dirt.integration.redis

Examples of org.springframework.xd.dirt.integration.redis.RedisMessageBus$SendingHandler


  public RedisTestMessageBus(RedisConnectionFactory connectionFactory) {
    template = new StringRedisTemplate(connectionFactory);
  }

  public RedisTestMessageBus(RedisConnectionFactory connectionFactory, MultiTypeCodec<Object> codec) {
    RedisMessageBus messageBus = new RedisMessageBus(connectionFactory, codec);
    GenericApplicationContext context = new GenericApplicationContext();
    context.getBeanFactory().registerSingleton(IntegrationUtils.INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME,
        new DefaultMessageBuilderFactory());
    DefaultHeaderChannelRegistry channelRegistry = new DefaultHeaderChannelRegistry();
    channelRegistry.setReaperDelay(Long.MAX_VALUE);
    ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
    taskScheduler.afterPropertiesSet();
    channelRegistry.setTaskScheduler(taskScheduler);
    context.getBeanFactory().registerSingleton(
        IntegrationContextUtils.INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME,
        channelRegistry);
    context.refresh();
    messageBus.setApplicationContext(context);
    setMessageBus(messageBus);
    template = new StringRedisTemplate(connectionFactory);
  }
View Full Code Here


  @Override
  protected MessageBus getMessageBus() {
    if (testMessageBus == null) {
      testMessageBus = new RedisTestMessageBus(redisAvailable.getResource(), getCodec());
      RedisMessageBus redisMessageBus = (RedisMessageBus) testMessageBus.getCoreMessageBus();
      redisMessageBus.setIntegrationEvaluationContext(new StandardEvaluationContext());
    }
    return testMessageBus;
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.integration.redis.RedisMessageBus$SendingHandler

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.