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

com.github.lontime.extredisson.service.AbstractProvider Maven / Gradle / Ivy

The newest version!
package com.github.lontime.extredisson.service;

import java.util.List;

import com.github.lontime.base.serial.model.Message;
import com.github.lontime.extredisson.configuration.OptionResolver;
import com.github.lontime.extredisson.configuration.ProducerOption;
import com.github.lontime.extredisson.listener.HandlerInterface;

/**
 * AbstractProvider.
 * @author lontime
 * @since 1.0
 */
public abstract class AbstractProvider implements Provider {

    @Override
    public List call(String name, List messages, HandlerInterface interfaces) {
        final ProducerOption option = OptionResolver.getInstance().getProducer(name);
        return call(option, messages, interfaces);
    }

    @Override
    public List call(ProducerOption option, List messages, HandlerInterface interfaces) {
        return new RealProducerHandler(option).handle(messages, interfaces);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy