类 RabbitProperties
- java.lang.Object
- org.springframework.boot.autoconfigure.amqp.RabbitProperties
@ConfigurationProperties(prefix="spring.rabbitmq") public class RabbitProperties extends Object
Configuration properties for Rabbit.
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
RabbitProperties.AmqpContainer
static class
RabbitProperties.Cache
static class
RabbitProperties.ContainerType
static class
RabbitProperties.DirectContainer
Configuration properties forDirectMessageListenerContainer
.static class
RabbitProperties.Listener
static class
RabbitProperties.ListenerRetry
static class
RabbitProperties.Retry
static class
RabbitProperties.SimpleContainer
Configuration properties forSimpleMessageListenerContainer
.static class
RabbitProperties.Ssl
static class
RabbitProperties.Template
构造器概要
构造器 构造器 说明 RabbitProperties()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
determineAddresses()
Returns the comma-separated addresses or a single address (host:port
) created from the configured host and port if no addresses have been set.String
determineHost()
Returns the host from the first address, or the configured host if no addresses have been set.String
determinePassword()
If addresses have been set and the first address has a password it is returned.int
determinePort()
Returns the port from the first address, or the configured port if no addresses have been set.String
determineUsername()
If addresses have been set and the first address has a username it is returned.String
determineVirtualHost()
If addresses have been set and the first address has a virtual host it is returned.String
getAddresses()
RabbitProperties.Cache
getCache()
Duration
getConnectionTimeout()
String
getHost()
RabbitProperties.Listener
getListener()
String
getPassword()
int
getPort()
Duration
getRequestedHeartbeat()
RabbitProperties.Ssl
getSsl()
RabbitProperties.Template
getTemplate()
String
getUsername()
String
getVirtualHost()
boolean
isPublisherConfirms()
boolean
isPublisherReturns()
void
setAddresses(String addresses)
void
setConnectionTimeout(Duration connectionTimeout)
void
setHost(String host)
void
setPassword(String password)
void
setPort(int port)
void
setPublisherConfirms(boolean publisherConfirms)
void
setPublisherReturns(boolean publisherReturns)
void
setRequestedHeartbeat(Duration requestedHeartbeat)
void
setUsername(String username)
void
setVirtualHost(String virtualHost)
构造器详细资料
RabbitProperties
public RabbitProperties()
方法详细资料
determineHost
public String determineHost()
Returns the host from the first address, or the configured host if no addresses have been set.- 返回:
- the host
- 另请参阅:
setAddresses(String)
,getHost()
getPort
public int getPort()
determinePort
public int determinePort()
Returns the port from the first address, or the configured port if no addresses have been set.- 返回:
- the port
- 另请参阅:
setAddresses(String)
,getPort()
setPort
public void setPort(int port)
getAddresses
public String getAddresses()
determineAddresses
public String determineAddresses()
Returns the comma-separated addresses or a single address (host:port
) created from the configured host and port if no addresses have been set.- 返回:
- the addresses
setAddresses
public void setAddresses(String addresses)
getUsername
public String getUsername()
determineUsername
public String determineUsername()
If addresses have been set and the first address has a username it is returned. Otherwise returns the result of callinggetUsername()
.- 返回:
- the username
- 另请参阅:
setAddresses(String)
,getUsername()
setUsername
public void setUsername(String username)
getPassword
public String getPassword()
determinePassword
public String determinePassword()
If addresses have been set and the first address has a password it is returned. Otherwise returns the result of callinggetPassword()
.- 返回:
- the password or
null
- 另请参阅:
setAddresses(String)
,getPassword()
setPassword
public void setPassword(String password)
getSsl
public RabbitProperties.Ssl getSsl()
getVirtualHost
public String getVirtualHost()
determineVirtualHost
public String determineVirtualHost()
If addresses have been set and the first address has a virtual host it is returned. Otherwise returns the result of callinggetVirtualHost()
.- 返回:
- the virtual host or
null
- 另请参阅:
setAddresses(String)
,getVirtualHost()
setVirtualHost
public void setVirtualHost(String virtualHost)
getRequestedHeartbeat
public Duration getRequestedHeartbeat()
setRequestedHeartbeat
public void setRequestedHeartbeat(Duration requestedHeartbeat)
isPublisherConfirms
public boolean isPublisherConfirms()
setPublisherConfirms
public void setPublisherConfirms(boolean publisherConfirms)
isPublisherReturns
public boolean isPublisherReturns()
setPublisherReturns
public void setPublisherReturns(boolean publisherReturns)
getConnectionTimeout
public Duration getConnectionTimeout()
setConnectionTimeout
public void setConnectionTimeout(Duration connectionTimeout)
getCache
public RabbitProperties.Cache getCache()
getListener
public RabbitProperties.Listener getListener()
getTemplate
public RabbitProperties.Template getTemplate()