public final class ExchangeBuilder extends AbstractBuilder
Exchanges.| Constructor and Description |
|---|
ExchangeBuilder(String name,
String type)
Construct an instance of the appropriate type.
|
| Modifier and Type | Method and Description |
|---|---|
ExchangeBuilder |
admins(Object... admins)
Admin instances, or admin bean names that should declare this exchange.
|
ExchangeBuilder |
alternate(String exchange) |
ExchangeBuilder |
autoDelete()
Set the auto delete flag.
|
<T extends Exchange> |
build() |
ExchangeBuilder |
delayed()
Set the delayed flag.
|
static ExchangeBuilder |
directExchange(String name)
Return a
DirectExchange builder. |
ExchangeBuilder |
durable(boolean isDurable)
Set the durable flag.
|
static ExchangeBuilder |
fanoutExchange(String name)
Return a
FanoutExchange builder. |
static ExchangeBuilder |
headersExchange(String name)
Return a
HeadersExchange builder. |
ExchangeBuilder |
ignoreDeclarationExceptions()
Switch on ignore exceptions such as mismatched properties when declaring.
|
ExchangeBuilder |
internal()
Set the internal flag.
|
ExchangeBuilder |
suppressDeclaration()
Switch to disable declaration of the exchange by any admin.
|
static ExchangeBuilder |
topicExchange(String name)
Return a
TopicExchange builder. |
ExchangeBuilder |
withArgument(String key,
Object value)
Add an argument.
|
ExchangeBuilder |
withArguments(Map<String,Object> arguments)
Add the arguments.
|
getArguments, getOrCreateArgumentspublic ExchangeBuilder(String name, String type)
name - the exchange nametype - the type nameExchangeTypespublic static ExchangeBuilder directExchange(String name)
DirectExchange builder.name - the name.public static ExchangeBuilder topicExchange(String name)
TopicExchange builder.name - the name.public static ExchangeBuilder fanoutExchange(String name)
FanoutExchange builder.name - the name.public static ExchangeBuilder headersExchange(String name)
HeadersExchange builder.name - the name.public ExchangeBuilder autoDelete()
public ExchangeBuilder durable(boolean isDurable)
isDurable - the durable flag (default true).public ExchangeBuilder withArgument(String key, Object value)
key - the argument key.value - the argument value.public ExchangeBuilder withArguments(Map<String,Object> arguments)
arguments - the arguments map.public ExchangeBuilder alternate(String exchange)
public ExchangeBuilder internal()
public ExchangeBuilder delayed()
public ExchangeBuilder ignoreDeclarationExceptions()
public ExchangeBuilder suppressDeclaration()
public ExchangeBuilder admins(Object... admins)
admins - the admins.public <T extends Exchange> T build()