public final class ExchangeBuilder extends AbstractBuilder
Exchange
s.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)
Admins, or admin bean names that should declare this exchange.
|
ExchangeBuilder |
autoDelete()
Set the auto delete flag.
|
Exchange |
build() |
ExchangeBuilder |
delayed()
Set the delayed flag.
|
static ExchangeBuilder |
directExchange(String name)
Return a
DirectExchange builder. |
ExchangeBuilder |
durable(boolean durable)
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, getOrCreateArguments
public ExchangeBuilder(String name, String type)
name
- the exchange nametype
- the type nameExchangeTypes
public 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 durable)
durable
- 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 internal()
public ExchangeBuilder delayed()
public ExchangeBuilder ignoreDeclarationExceptions()
public ExchangeBuilder suppressDeclaration()
public ExchangeBuilder admins(Object... admins)
admins
- the admins.public Exchange build()