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

com.aliyun.openservices.ons.client.ONSFactoryImpl Maven / Gradle / Ivy

There is a newer version: 2.0.7.Final
Show newest version
package com.aliyun.openservices.ons.client;

import com.aliyun.openservices.ons.api.Consumer;
import com.aliyun.openservices.ons.api.ONSFactoryAPI;
import com.aliyun.openservices.ons.api.Producer;
import com.aliyun.openservices.ons.api.PullConsumer;
import com.aliyun.openservices.ons.api.batch.BatchConsumer;
import com.aliyun.openservices.ons.api.order.OrderConsumer;
import com.aliyun.openservices.ons.api.order.OrderProducer;
import com.aliyun.openservices.ons.api.transaction.LocalTransactionChecker;
import com.aliyun.openservices.ons.api.transaction.TransactionProducer;
import com.aliyun.openservices.ons.client.rocketmq.impl.BatchConsumerImpl;
import com.aliyun.openservices.ons.client.rocketmq.impl.OrderConsumerImpl;
import com.aliyun.openservices.ons.client.rocketmq.impl.ProducerImpl;
import com.aliyun.openservices.ons.client.rocketmq.impl.PushConsumerImpl;
import java.util.Properties;

public class ONSFactoryImpl implements ONSFactoryAPI {
    @Override
    public Producer createProducer(Properties properties) {
        return new ProducerImpl(properties);
    }

    @Override
    public Consumer createConsumer(Properties properties) {
        return new PushConsumerImpl(properties);
    }

    @Override
    public BatchConsumer createBatchConsumer(Properties properties) {
        return new BatchConsumerImpl(properties);
    }

    @Override
    public OrderProducer createOrderProducer(Properties properties) {
        return new ProducerImpl(properties);
    }

    @Override
    public OrderConsumer createOrderedConsumer(Properties properties) {
        return new OrderConsumerImpl(properties);
    }

    @Override
    public TransactionProducer createTransactionProducer(Properties properties, final LocalTransactionChecker checker) {
        return new ProducerImpl(properties, checker);
    }

    @Override
    public PullConsumer createPullConsumer(Properties properties) {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy