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

com.taosdata.jdbc.ws.tmq.WSConsumerFactory Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
package com.taosdata.jdbc.ws.tmq;

import com.taosdata.jdbc.common.Consumer;
import com.taosdata.jdbc.common.ConsumerFactory;
import com.taosdata.jdbc.common.ConsumerManager;
import com.taosdata.jdbc.enums.ConnectionType;

public class WSConsumerFactory implements ConsumerFactory {

    static {
        ConsumerManager.register(new WSConsumerFactory());
    }

    @Override
    public boolean acceptsType(String type) {
        return ConnectionType.WS.getType().equalsIgnoreCase(type) || ConnectionType.WEBSOCKET.getType().equalsIgnoreCase(type);
    }

    @Override
    public Consumer getConsumer() {
        return new WSConsumer<>();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy