Class RabbitProperties
- java.lang.Object
- org.springframework.boot.autoconfigure.amqp.RabbitProperties
@ConfigurationProperties(prefix="spring.rabbitmq") public class RabbitProperties extends Object
Configuration properties for Rabbit.
Nested Class Summary
Nested Classes Modifier and Type Class Description 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
Constructor Summary
Constructors Constructor Description RabbitProperties()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Constructor Detail
RabbitProperties
public RabbitProperties()
Method Detail
determineHost
public String determineHost()
Returns the host from the first address, or the configured host if no addresses have been set.- Returns:
- the host
- See Also:
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.- Returns:
- the port
- See Also:
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.- Returns:
- 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()
.- Returns:
- the username
- See Also:
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()
.- Returns:
- the password or
null
- See Also:
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()
.- Returns:
- the virtual host or
null
- See Also:
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()