Package com.cxy.redisclient.service

Source Code of com.cxy.redisclient.service.PubSubService

package com.cxy.redisclient.service;

import redis.clients.jedis.JedisPubSub;

import com.cxy.redisclient.integration.pubsub.Publish;
import com.cxy.redisclient.integration.pubsub.Subscribe;

public class PubSubService {
  public void publish(int id, String channel, String message){
    Publish command = new Publish(id, channel, message);
    command.execute();
  }
 
  public void subscribe(int id, JedisPubSub callback, String channels){
    Subscribe command = new Subscribe(id, callback, channels);
    command.execute();
  }
}
TOP

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

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.