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 beingrabbitmq.
. Property files can be loaded from the file system (the default), but also from the classpath, by using theclasspath:
prefix in the location. Client properties can be set by using theclient.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:
- 4.4.0
- See Also:
ConnectionFactory.load(String, String)
-
-
Field Summary
Fields Modifier and Type Field Description static String
CHANNEL_RPC_TIMEOUT
static String
CHANNEL_SHOULD_CHECK_RPC_RESPONSE_TYPE
static String
CLIENT_PROPERTIES_PREFIX
static String
CONNECTION_CHANNEL_MAX
static String
CONNECTION_FRAME_MAX
static String
CONNECTION_HEARTBEAT
static String
CONNECTION_RECOVERY_ENABLED
static String
CONNECTION_RECOVERY_INTERVAL
static String
CONNECTION_TIMEOUT
static String
DEFAULT_PREFIX
static String
HANDSHAKE_TIMEOUT
static String
HOST
static String
NIO_NB_IO_THREADS
static String
NIO_READ_BYTE_BUFFER_SIZE
static String
NIO_WRITE_BYTE_BUFFER_SIZE
static String
NIO_WRITE_ENQUEUING_TIMEOUT_IN_MS
static String
NIO_WRITE_QUEUE_CAPACITY
static String
PASSWORD
static String
PORT
static String
SHUTDOWN_TIMEOUT
static String
TOPOLOGY_RECOVERY_ENABLED
static String
USE_NIO
static String
USERNAME
static String
VIRTUAL_HOST
-
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)
-
-
-
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
-
-
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)
-
-