Package com.rabbitmq.client
Class ConnectionFactoryConfigurator
- java.lang.Object
-
- com.rabbitmq.client.ConnectionFactoryConfigurator
-
public class ConnectionFactoryConfigurator extends Object
Helper class to loadConnectionFactorysettings 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 StringCHANNEL_RPC_TIMEOUTstatic StringCHANNEL_SHOULD_CHECK_RPC_RESPONSE_TYPEstatic StringCLIENT_PROPERTIES_PREFIXstatic StringCONNECTION_CHANNEL_MAXstatic StringCONNECTION_FRAME_MAXstatic StringCONNECTION_HEARTBEATstatic StringCONNECTION_RECOVERY_ENABLEDstatic StringCONNECTION_RECOVERY_INTERVALstatic StringCONNECTION_TIMEOUTstatic StringDEFAULT_PREFIXstatic StringHANDSHAKE_TIMEOUTstatic StringHOSTstatic StringNIO_NB_IO_THREADSstatic StringNIO_READ_BYTE_BUFFER_SIZEstatic StringNIO_WRITE_BYTE_BUFFER_SIZEstatic StringNIO_WRITE_ENQUEUING_TIMEOUT_IN_MSstatic StringNIO_WRITE_QUEUE_CAPACITYstatic StringPASSWORDstatic StringPORTstatic StringSHUTDOWN_TIMEOUTstatic StringTOPOLOGY_RECOVERY_ENABLEDstatic StringUSE_NIOstatic StringUSERNAMEstatic StringVIRTUAL_HOST
-
Constructor Summary
Constructors Constructor Description ConnectionFactoryConfigurator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidload(ConnectionFactory connectionFactory, String propertyFileLocation)static voidload(ConnectionFactory cf, String propertyFileLocation, String prefix)static voidload(ConnectionFactory connectionFactory, Map<String,String> properties)static voidload(ConnectionFactory cf, Map<String,String> properties, String prefix)static voidload(ConnectionFactory connectionFactory, Properties properties)static voidload(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)
-
-