All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gu.simplemq.IPublisher Maven / Gradle / Ivy

There is a newer version: 2.3.17
Show newest version
package gu.simplemq;

import java.util.Collection;

/**
 * 发布订阅接口
 * @author guyadong
 *
 */
public interface IPublisher{
	/**
	 * 向指定的频道发布消息
	 * @param channel 频道
	 * @param object 消息对象
	 * @return  the number of clients that received the message
	 */
	 long publish(Channel channel,T object);

	/**
	 * 参见 {@link #publish(Channel, Object)}
	 * @param channel
	 * @param objects
	 */
	 void publish(Channel channel, Collection objects);

	/**
	 * 参见 {@link #publish(Channel, Object)}
	 * @param channel
	 * @param objects
	 */
	 void publish(Channel channel, @SuppressWarnings("unchecked") T... objects);

	IAdvisor getAdvisor();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy