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

gu.simplemq.proton.ProtonConstProvider Maven / Gradle / Ivy

package gu.simplemq.proton;

import java.util.Properties;

import gu.simplemq.MQConstProvider;

public class ProtonConstProvider implements MQConstProvider,ProtonConstants{
	public static final ProtonConstProvider APROVIDER = new ProtonConstProvider();
	private static final String[] optionalLocationNames = new String[]{JCON_remoteURI};
	/** 
	 * 缺省连接参数
* 这里没有使用guava的ImmutableMap,因为HashMap允许Value为null, ImmutableMap不允许 **/ public static final Properties DEFAULT_PARAMETERS = new Properties(){ private static final long serialVersionUID = 1L; { put(JCON_remoteURI, DEFAULT_AMQP_BROKER_URL); } }; private ProtonConstProvider() { super(); } @Override public String getDefaultSchema() { return AMQP_SCHEMA; } @Override public String getDefaultHost() { return DEFAULT_AMQP_HOST; } @Override public int getDefaultPort() { return DEFAULT_AMQP_PORT; } @Override public String getDefaultMQLocation() { return DEFAULT_AMQP_BROKER_URL; } @Override public String getMainLocationName() { return JCON_remoteURI; } @Override public String getMainUserName() { return null; } @Override public String getMainPassword() { return null; } @Override public String getMainClientID() { return JCON_CLIENTID; } @Override public String getMainTimeout() { return JCON_sendTimeout; } @Override public String getMainConnectTimeout() { return JCON_connectTimeout; } @Override public String[] getOptionalLocationNames(){ return optionalLocationNames; } @Override public Properties getDefaultMQProperties(){ return DEFAULT_PARAMETERS; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy