Package interlok.rabbitmq
Class ExplicitExchange
- java.lang.Object
-
- interlok.rabbitmq.ExplicitExchange
-
- All Implemented Interfaces:
Declaration.ExchangeDeclaration
@ComponentProfile(summary="Explicitly declare a RabbitMQ Exchange", since="4.3.0") public class ExplicitExchange extends java.lang.Object implements Declaration.ExchangeDeclarationDeclaring an explicit exchange.Depending on your RabbitMQ configuration you may wish to explicitly declare an exchange that is not the 'default exchange' when producing messages.
-
-
Constructor Summary
Constructors Constructor Description ExplicitExchange()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeclare(com.rabbitmq.client.Channel ch)Declare the exchange.java.lang.BooleangetDurable()Whether or not the exchange should survive a server restart.java.lang.StringgetName()The exchange name.com.rabbitmq.client.BuiltinExchangeTypegetType()The exchange type.java.lang.Stringname()The name of the exchange that was declared.voidsetDurable(java.lang.Boolean durable)Whether or not the exchange should survive a server restart.voidsetName(java.lang.String name)The exchange name.voidsetType(com.rabbitmq.client.BuiltinExchangeType type)The exchange type.ExplicitExchangewithDurable(java.lang.Boolean b)ExplicitExchangewithName(java.lang.String s)ExplicitExchangewithType(com.rabbitmq.client.BuiltinExchangeType t)
-
-
-
Method Detail
-
declare
public void declare(com.rabbitmq.client.Channel ch) throws java.lang.ExceptionDescription copied from interface:Declaration.ExchangeDeclarationDeclare the exchange.- Specified by:
declarein interfaceDeclaration.ExchangeDeclaration- Parameters:
ch- the channel to use to declare the exchange.- Throws:
java.lang.Exception
-
withName
public ExplicitExchange withName(java.lang.String s)
-
withType
public ExplicitExchange withType(com.rabbitmq.client.BuiltinExchangeType t)
-
withDurable
public ExplicitExchange withDurable(java.lang.Boolean b)
-
name
public java.lang.String name()
Description copied from interface:Declaration.ExchangeDeclarationThe name of the exchange that was declared.- Specified by:
namein interfaceDeclaration.ExchangeDeclaration
-
setType
public void setType(com.rabbitmq.client.BuiltinExchangeType type)
The exchange type.
-
getType
public com.rabbitmq.client.BuiltinExchangeType getType()
The exchange type.
-
getName
public java.lang.String getName()
The exchange name.
-
setName
public void setName(java.lang.String name)
The exchange name.
-
getDurable
public java.lang.Boolean getDurable()
Whether or not the exchange should survive a server restart.
-
setDurable
public void setDurable(java.lang.Boolean durable)
Whether or not the exchange should survive a server restart.
-
-