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

gu.simplemq.BaseMQProducer Maven / Gradle / Ivy

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

import java.util.Arrays;
import java.util.Collection;

import gu.simplemq.Channel;
import gu.simplemq.IProducer;
import gu.simplemq.pool.BaseMQPool;
/**
 * 基于{@link BaseMQSender}的{@link IProducer} 实现基类
 * @author guyadong
 *
 */
public abstract class BaseMQProducer extends BaseMQSender implements IProducer{
	public BaseMQProducer(BaseMQPool poolLazy) {
		super(poolLazy);
	}
	
	@Override
	public final  void produce(Channel channel, T object) {
		doProduce(channel, Arrays.asList(object));
	}

	@Override
	public final  void produce(Channel channel, @SuppressWarnings("unchecked") T... objects) {
		if(objects != null){
			doProduce(channel, Arrays.asList(objects));
		}
	}	
	@Override
	public final  void produce(Channel channel, Collectionc) {
		doProduce(channel, c);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy