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

io.geewit.boot.aliyun.ons.utils.PropertiesBuilder Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package io.geewit.boot.aliyun.ons.utils;

import com.aliyun.openservices.ons.api.PropertyKeyConst;
import io.geewit.boot.aliyun.AliyunProperties;
import io.geewit.boot.aliyun.ons.AliyunOnsProperties;

import java.util.Properties;

/**
 * @author geewit
 */
@SuppressWarnings({"unused"})
public class PropertiesBuilder {
    public static Properties properties(AliyunProperties aliyunProperties, AliyunOnsProperties aliyunOnsProperties) {
        Properties properties = new Properties();
        properties.put(PropertyKeyConst.AccessKey, aliyunProperties.getKey());
        properties.put(PropertyKeyConst.SecretKey, aliyunProperties.getSecret());
        properties.put(PropertyKeyConst.ONSAddr, aliyunOnsProperties.getOnsaddr());
        properties.put(PropertyKeyConst.SendMsgTimeoutMillis, aliyunOnsProperties.getSendTimeout());
        return properties;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy