public class ConnectionFactoryConfigurator extends Object
ConnectionFactory
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.ConnectionFactory.load(String, String)
Modifier and Type | Field and 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 and Description |
---|
ConnectionFactoryConfigurator() |
Modifier and Type | Method and Description |
---|---|
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 void |
load(ConnectionFactory connectionFactory,
String propertyFileLocation) |
static void |
load(ConnectionFactory cf,
String propertyFileLocation,
String prefix) |
public static final String DEFAULT_PREFIX
public static final String USERNAME
public static final String PASSWORD
public static final String VIRTUAL_HOST
public static final String HOST
public static final String PORT
public static final String CONNECTION_CHANNEL_MAX
public static final String CONNECTION_FRAME_MAX
public static final String CONNECTION_HEARTBEAT
public static final String CONNECTION_TIMEOUT
public static final String HANDSHAKE_TIMEOUT
public static final String SHUTDOWN_TIMEOUT
public static final String CLIENT_PROPERTIES_PREFIX
public static final String CONNECTION_RECOVERY_ENABLED
public static final String TOPOLOGY_RECOVERY_ENABLED
public static final String CONNECTION_RECOVERY_INTERVAL
public static final String CHANNEL_RPC_TIMEOUT
public static final String CHANNEL_SHOULD_CHECK_RPC_RESPONSE_TYPE
public static final String USE_NIO
public static final String NIO_READ_BYTE_BUFFER_SIZE
public static final String NIO_WRITE_BYTE_BUFFER_SIZE
public static final String NIO_NB_IO_THREADS
public static final String NIO_WRITE_ENQUEUING_TIMEOUT_IN_MS
public static final String NIO_WRITE_QUEUE_CAPACITY
public static void load(ConnectionFactory cf, String propertyFileLocation, String prefix) throws IOException
IOException
public static void load(ConnectionFactory cf, Map<String,String> properties, String prefix)
public static void load(ConnectionFactory connectionFactory, String propertyFileLocation) throws IOException
IOException
public static void load(ConnectionFactory connectionFactory, Properties properties)
public static void load(ConnectionFactory connectionFactory, Properties properties, String prefix)
public static void load(ConnectionFactory connectionFactory, Map<String,String> properties)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.