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

gu.simplemq.mqtt.MqttPoolLazys Maven / Gradle / Ivy

There is a newer version: 2.4.0-alpha3
Show newest version
package gu.simplemq.mqtt;

import java.util.Map;
import gu.simplemq.MQProperties;
import gu.simplemq.pool.NamedMQPools;

/**
 * 基于名字管理的 {@link org.eclipse.paho.client.mqttv3.MqttClient}资源池(线程安全)
* @author guyadong * */ public class MqttPoolLazys extends NamedMQPools{ public static final MqttPoolLazys NAMED_POOLS = new MqttPoolLazys(); protected MqttPoolLazys() { super(PropertiesHelper.MHELPER); } @SuppressWarnings("rawtypes") @Override public void checkConnect(Map input, Long timeoutMills) { MQProperties props = propertiesHelper.initParameters(input); if(timeoutMills != null && timeoutMills > 0){ /** 定义 MqttPoolLazy.timeTowaitInMillis 字段 */ props.put("timeTowaitInMillis", timeoutMills); } checkConnect0(props); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy