public static class RMQConnectionConfig.Builder extends Object
RMQConnectionConfig
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RMQConnectionConfig |
build()
The Builder method.
|
RMQConnectionConfig.Builder |
setAutomaticRecovery(boolean automaticRecovery)
Enables or disables automatic connection recovery.
|
RMQConnectionConfig.Builder |
setConnectionTimeout(int connectionTimeout)
Set the connection timeout.
|
RMQConnectionConfig.Builder |
setHost(String host) |
RMQConnectionConfig.Builder |
setNetworkRecoveryInterval(int networkRecoveryInterval)
Sets connection recovery interval.
|
RMQConnectionConfig.Builder |
setPassword(String password)
Set the password.
|
RMQConnectionConfig.Builder |
setPort(int port)
Set the target port.
|
RMQConnectionConfig.Builder |
setRequestedChannelMax(int requestedChannelMax)
Set the requested maximum channel number.
|
RMQConnectionConfig.Builder |
setRequestedFrameMax(int requestedFrameMax)
Set the requested maximum frame size.
|
RMQConnectionConfig.Builder |
setRequestedHeartbeat(int requestedHeartbeat)
Set the requested heartbeat.
|
RMQConnectionConfig.Builder |
setTopologyRecoveryEnabled(boolean topologyRecovery)
Enables or disables topology recovery.
|
RMQConnectionConfig.Builder |
setUri(String uri)
Convenience method for setting the fields in an AMQP URI: host, port, username, password
and virtual host.
|
RMQConnectionConfig.Builder |
setUserName(String username)
Set the user name.
|
RMQConnectionConfig.Builder |
setVirtualHost(String virtualHost)
Set the virtual host.
|
public RMQConnectionConfig.Builder setPort(int port)
port
- the default port to use for connectionspublic RMQConnectionConfig.Builder setHost(String host)
host
- the default host to use for connectionspublic RMQConnectionConfig.Builder setVirtualHost(String virtualHost)
virtualHost
- the virtual host to use when connecting to the brokerpublic RMQConnectionConfig.Builder setUserName(String username)
username
- the AMQP user name to use when connecting to the brokerpublic RMQConnectionConfig.Builder setPassword(String password)
password
- the password to use when connecting to the brokerpublic RMQConnectionConfig.Builder setUri(String uri)
uri
- is the AMQP URI containing the datapublic RMQConnectionConfig.Builder setTopologyRecoveryEnabled(boolean topologyRecovery)
topologyRecovery
- if true, enables topology recoverypublic RMQConnectionConfig.Builder setRequestedHeartbeat(int requestedHeartbeat)
requestedHeartbeat
- the initially requested heartbeat interval, in seconds; zero
for nonepublic RMQConnectionConfig.Builder setRequestedFrameMax(int requestedFrameMax)
requestedFrameMax
- initially requested maximum frame size, in octets; zero for
unlimitedpublic RMQConnectionConfig.Builder setRequestedChannelMax(int requestedChannelMax)
requestedChannelMax
- initially requested maximum channel number; zero for unlimitedpublic RMQConnectionConfig.Builder setNetworkRecoveryInterval(int networkRecoveryInterval)
networkRecoveryInterval
- how long will automatic recovery wait before attempting to
reconnect, in mspublic RMQConnectionConfig.Builder setConnectionTimeout(int connectionTimeout)
connectionTimeout
- connection establishment timeout in milliseconds; zero for
infinitepublic RMQConnectionConfig.Builder setAutomaticRecovery(boolean automaticRecovery)
automaticRecovery
- if true, enables connection recoverypublic RMQConnectionConfig build()
If URI is NULL we use host, port, vHost, username, password combination to initialize
connection. using RMQConnectionConfig.RMQConnectionConfig(String, Integer, String,
String, String, Integer, Boolean, Boolean, Integer, Integer, Integer, Integer)
.
Otherwise the URI will be used to initialize the client connection RMQConnectionConfig.RMQConnectionConfig(String, Integer, Boolean, Boolean, Integer,
Integer, Integer, Integer)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.