Package org.springframework.data.redis.listener.adapter

Examples of org.springframework.data.redis.listener.adapter.MessageListenerAdapter.afterPropertiesSet()


  }

  private void setupMessageListener(CountDownLatch latch, String topic) throws InterruptedException {
    MessageListenerAdapter listener = new MessageListenerAdapter();
    listener.setDelegate(new Listener(latch));
    listener.afterPropertiesSet();

    this.container = new RedisMessageListenerContainer();
    container.setConnectionFactory(this.redisAvailableRule.getResource());
    container.afterPropertiesSet();
    container.addMessageListener(listener, Collections.<Topic> singletonList(new ChannelTopic(topic)));
View Full Code Here


  private void setupListener(RedisSerializer<?> listenerSerializer) throws InterruptedException {
    MessageListenerAdapter listener = new MessageListenerAdapter();
    listener.setDelegate(new Listener(latch));
    listener.setSerializer(listenerSerializer);
    listener.afterPropertiesSet();

    this.container = new RedisMessageListenerContainer();
    container.setConnectionFactory(connectionFactory);
    container.afterPropertiesSet();
    container.addMessageListener(listener, Collections.<Topic> singletonList(new ChannelTopic(TOPIC)));
View Full Code Here

    final String ANOTHER_CHANNEL = "pubsub::test::extra";

    BlockingDeque<String> bag2 = new LinkedBlockingDeque<String>(99);
    MessageListenerAdapter anotherListener = new MessageListenerAdapter(new MessageHandler("handler2", bag2));
    anotherListener.setSerializer(template.getValueSerializer());
    anotherListener.afterPropertiesSet();

    // remove adapter from all channels
    container.addMessageListener(anotherListener, new PatternTopic(PATTERN));
    container.removeMessageListener(adapter);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.