gu.simplemq.BaseMQProducer Maven / Gradle / Ivy
The newest version!
package gu.simplemq;
import java.util.Arrays;
import java.util.Collection;
import com.google.common.base.Function;
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);
}
@Override
public IProducer withStringSerializer(Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy