Package com.cxy.redisclient.service

Examples of com.cxy.redisclient.service.PubSubService


import junit.framework.TestCase;

public class PubSub extends TestCase {
  public void testPub(){
    PubSubService service = new PubSubService();
    service.publish(13, "test", "16:16 message");
  }
View Full Code Here


  public void testPub(){
    PubSubService service = new PubSubService();
    service.publish(13, "test", "16:16 message");
  }
  public void testSub(){
    PubSubService service = new PubSubService();
    service.subscribe(13, new JedisPubSub() {

      @Override
      public void onMessage(String channel, String message) {
        System.out.println(channel + " received:" + message);
       
View Full Code Here

     
    };
   
    final Thread t = new Thread(new Runnable() {
        public void run() {
          PubSubService subscribe = new PubSubService();
          subscribe.subscribe(id, callback, subChannel);
        }
    });
    t.start();
   
    tbtmSubItem.addDisposeListener(new DisposeListener() {
View Full Code Here

TOP

Related Classes of com.cxy.redisclient.service.PubSubService

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.