Package com.rabbitmq.client
Class ConnectionFactoryConfigurator
- java.lang.Object
-
- com.rabbitmq.client.ConnectionFactoryConfigurator
-
public class ConnectionFactoryConfigurator extends Object
Helper class to loadConnectionFactory
settings from a property file.The authorised keys are the constants values in this class (e.g. USERNAME). The property file/properties instance/map instance keys can have a prefix, the default being
rabbitmq.
.Property files can be loaded from the file system (the default), but also from the classpath, by using the
classpath:
prefix in the location.Client properties can be set by using the
client.properties.
prefix, e.g.client.properties.app.name
. Default client properties and custom client properties are merged. To remove a default client property, set its key to an empty value.- Since:
- 5.1.0
- See Also:
ConnectionFactory.load(String, String)
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ConnectionFactoryConfigurator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
load(ConnectionFactory connectionFactory, String propertyFileLocation)
static void
load(ConnectionFactory cf, String propertyFileLocation, String prefix)
static void
load(ConnectionFactory connectionFactory, Map<String,String> properties)
static void
load(ConnectionFactory cf, Map<String,String> properties, String prefix)
static void
load(ConnectionFactory connectionFactory, Properties properties)
static void
load(ConnectionFactory connectionFactory, Properties properties, String prefix)
static String
lookUp(String key, Map<String,String> properties, String prefix)
static String
lookUp(String key, Map<String,String> properties, String prefix, String defaultValue)
-
-
-
Field Detail
-
DEFAULT_PREFIX
public static final String DEFAULT_PREFIX
- See Also:
- Constant Field Values
-
USERNAME
public static final String USERNAME
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
VIRTUAL_HOST
public static final String VIRTUAL_HOST
- See Also:
- Constant Field Values
-
HOST
public static final String HOST
- See Also:
- Constant Field Values
-
PORT
public static final String PORT
- See Also:
- Constant Field Values
-
CONNECTION_CHANNEL_MAX
public static final String CONNECTION_CHANNEL_MAX
- See Also:
- Constant Field Values
-
CONNECTION_FRAME_MAX
public static final String CONNECTION_FRAME_MAX
- See Also:
- Constant Field Values
-
CONNECTION_HEARTBEAT
public static final String CONNECTION_HEARTBEAT
- See Also:
- Constant Field Values
-
CONNECTION_TIMEOUT
public static final String CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
-
HANDSHAKE_TIMEOUT
public static final String HANDSHAKE_TIMEOUT
- See Also:
- Constant Field Values
-
SHUTDOWN_TIMEOUT
public static final String SHUTDOWN_TIMEOUT
- See Also:
- Constant Field Values
-
CLIENT_PROPERTIES_PREFIX
public static final String CLIENT_PROPERTIES_PREFIX
- See Also:
- Constant Field Values
-
CONNECTION_RECOVERY_ENABLED
public static final String CONNECTION_RECOVERY_ENABLED
- See Also:
- Constant Field Values
-
TOPOLOGY_RECOVERY_ENABLED
public static final String TOPOLOGY_RECOVERY_ENABLED
- See Also:
- Constant Field Values
-
CONNECTION_RECOVERY_INTERVAL
public static final String CONNECTION_RECOVERY_INTERVAL
- See Also:
- Constant Field Values
-
CHANNEL_RPC_TIMEOUT
public static final String CHANNEL_RPC_TIMEOUT
- See Also:
- Constant Field Values
-
CHANNEL_SHOULD_CHECK_RPC_RESPONSE_TYPE
public static final String CHANNEL_SHOULD_CHECK_RPC_RESPONSE_TYPE
- See Also:
- Constant Field Values
-
USE_NIO
public static final String USE_NIO
- See Also:
- Constant Field Values
-
NIO_READ_BYTE_BUFFER_SIZE
public static final String NIO_READ_BYTE_BUFFER_SIZE
- See Also:
- Constant Field Values
-
NIO_WRITE_BYTE_BUFFER_SIZE
public static final String NIO_WRITE_BYTE_BUFFER_SIZE
- See Also:
- Constant Field Values
-
NIO_NB_IO_THREADS
public static final String NIO_NB_IO_THREADS
- See Also:
- Constant Field Values
-
NIO_WRITE_ENQUEUING_TIMEOUT_IN_MS
public static final String NIO_WRITE_ENQUEUING_TIMEOUT_IN_MS
- See Also:
- Constant Field Values
-
NIO_WRITE_QUEUE_CAPACITY
public static final String NIO_WRITE_QUEUE_CAPACITY
- See Also:
- Constant Field Values
-
SSL_ALGORITHM
public static final String SSL_ALGORITHM
- See Also:
- Constant Field Values
-
SSL_ENABLED
public static final String SSL_ENABLED
- See Also:
- Constant Field Values
-
SSL_KEY_STORE
public static final String SSL_KEY_STORE
- See Also:
- Constant Field Values
-
SSL_KEY_STORE_PASSWORD
public static final String SSL_KEY_STORE_PASSWORD
- See Also:
- Constant Field Values
-
SSL_KEY_STORE_TYPE
public static final String SSL_KEY_STORE_TYPE
- See Also:
- Constant Field Values
-
SSL_KEY_STORE_ALGORITHM
public static final String SSL_KEY_STORE_ALGORITHM
- See Also:
- Constant Field Values
-
SSL_TRUST_STORE
public static final String SSL_TRUST_STORE
- See Also:
- Constant Field Values
-
SSL_TRUST_STORE_PASSWORD
public static final String SSL_TRUST_STORE_PASSWORD
- See Also:
- Constant Field Values
-
SSL_TRUST_STORE_TYPE
public static final String SSL_TRUST_STORE_TYPE
- See Also:
- Constant Field Values
-
SSL_TRUST_STORE_ALGORITHM
public static final String SSL_TRUST_STORE_ALGORITHM
- See Also:
- Constant Field Values
-
SSL_VALIDATE_SERVER_CERTIFICATE
public static final String SSL_VALIDATE_SERVER_CERTIFICATE
- See Also:
- Constant Field Values
-
SSL_VERIFY_HOSTNAME
public static final String SSL_VERIFY_HOSTNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
load
public static void load(ConnectionFactory cf, String propertyFileLocation, String prefix) throws IOException
- Throws:
IOException
-
load
public static void load(ConnectionFactory cf, Map<String,String> properties, String prefix)
-
load
public static void load(ConnectionFactory connectionFactory, String propertyFileLocation) throws IOException
- Throws:
IOException
-
load
public static void load(ConnectionFactory connectionFactory, Properties properties)
-
load
public static void load(ConnectionFactory connectionFactory, Properties properties, String prefix)
-
load
public static void load(ConnectionFactory connectionFactory, Map<String,String> properties)
-
-