Class ExchangeBuilder
java.lang.Object
org.springframework.amqp.core.AbstractBuilder
org.springframework.amqp.core.ExchangeBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionExchangeBuilder
(String name, String type) Construct an instance of the appropriate type. -
Method Summary
Modifier and TypeMethodDescriptionAdmin instances, or admin bean names that should declare this exchange.Set the auto delete flag.<T extends Exchange>
Tbuild()
delayed()
Set the delayed flag.static ExchangeBuilder
directExchange
(String name) Return aDirectExchange
builder.durable
(boolean isDurable) Set the durable flag.static ExchangeBuilder
fanoutExchange
(String name) Return aFanoutExchange
builder.static ExchangeBuilder
headersExchange
(String name) Return aHeadersExchange
builder.Switch on ignore exceptions such as mismatched properties when declaring.internal()
Set the internal flag.Switch to disable declaration of the exchange by any admin.static ExchangeBuilder
topicExchange
(String name) Return aTopicExchange
builder.withArgument
(String key, Object value) Add an argument.withArguments
(Map<String, Object> arguments) Add the arguments.Methods inherited from class org.springframework.amqp.core.AbstractBuilder
getArguments, getOrCreateArguments
-
Constructor Details
-
ExchangeBuilder
-
-
Method Details
-
directExchange
Return aDirectExchange
builder.- Parameters:
name
- the name.- Returns:
- the builder.
-
topicExchange
Return aTopicExchange
builder.- Parameters:
name
- the name.- Returns:
- the builder.
-
fanoutExchange
Return aFanoutExchange
builder.- Parameters:
name
- the name.- Returns:
- the builder.
-
headersExchange
Return aHeadersExchange
builder.- Parameters:
name
- the name.- Returns:
- the builder.
-
autoDelete
-
durable
Set the durable flag.- Parameters:
isDurable
- the durable flag (default true).- Returns:
- the builder.
-
withArgument
Add an argument.- Parameters:
key
- the argument key.value
- the argument value.- Returns:
- the builder.
-
withArguments
Add the arguments.- Parameters:
arguments
- the arguments map.- Returns:
- the builder.
-
alternate
-
internal
-
delayed
-
ignoreDeclarationExceptions
Switch on ignore exceptions such as mismatched properties when declaring.- Returns:
- the builder.
- Since:
- 2.0
-
suppressDeclaration
Switch to disable declaration of the exchange by any admin.- Returns:
- the builder.
- Since:
- 2.1
-
admins
Admin instances, or admin bean names that should declare this exchange.- Parameters:
admins
- the admins.- Returns:
- the builder.
- Since:
- 2.1
-
build
-