public class RMQDestination
extends java.lang.Object
implements javax.jms.Queue, javax.jms.Topic, javax.jms.Destination, javax.naming.Referenceable, java.io.Serializable, javax.jms.TemporaryQueue, javax.jms.TemporaryTopic
Topic and Queue Destination.
This implementation is Serializable so it can be stored in a JNDI naming context. It is also
Referenceable for the same purpose.
| Constructor and Description |
|---|
RMQDestination()
Constructor used only for Java serialisation
|
RMQDestination(java.lang.String destName,
boolean isQueue,
boolean isTemporary)
Creates a destination for RJMS
|
RMQDestination(java.lang.String destName,
boolean isQueue,
boolean isTemporary,
java.util.Map<java.lang.String,java.lang.Object> queueDeclareArguments)
Creates a destination for RJMS with arguments to declare the AMQP queue
|
RMQDestination(java.lang.String destName,
java.lang.String amqpExchangeName,
java.lang.String amqpRoutingKey,
java.lang.String amqpQueueName)
Creates a destination for RJMS mapped onto an AMQP queue/destination.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
This method is for
TemporaryQueues only — deletion currently occurs automatically on session close. |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAmqpExchangeName() |
java.lang.String |
getAmqpExchangeType()
Internal use only
|
java.lang.String |
getAmqpQueueName() |
java.lang.String |
getAmqpRoutingKey() |
java.lang.String |
getDestinationName() |
java.util.Map<java.lang.String,java.lang.Object> |
getQueueDeclareArguments() |
java.lang.String |
getQueueName() |
javax.naming.Reference |
getReference() |
java.lang.String |
getTopicName() |
int |
hashCode() |
boolean |
isAmqp() |
boolean |
isAmqpReadable() |
boolean |
isAmqpWritable() |
boolean |
isDeclared()
For internal use only.
|
boolean |
isQueue() |
boolean |
isTemporary() |
boolean |
noNeedToDeclareExchange()
Internal use only
|
void |
setAmqp(boolean amqp)
For JNDI binding and Spring beans
|
void |
setAmqpExchangeName(java.lang.String amqpExchangeName)
For JNDI binding and Spring beans
|
void |
setAmqpQueueName(java.lang.String amqpQueueName)
For JNDI binding and Spring beans
|
void |
setAmqpRoutingKey(java.lang.String routingKey)
For JNDI binding and Spring beans
|
void |
setDeclared(boolean isDeclared)
For internal use only.
|
void |
setDestinationName(java.lang.String destinationName)
For JNDI binding and Spring beans
|
void |
setQueue(boolean isQueue)
Set to true if this is a queue, false if this is a topic - should only be
used when binding into JNDI
|
java.lang.String |
toString() |
public RMQDestination()
public RMQDestination(java.lang.String destName,
boolean isQueue,
boolean isTemporary)
destName - the name of the topic or queueisQueue - true if this represent a queueisTemporary - true if this is a temporary destinationpublic RMQDestination(java.lang.String destName,
boolean isQueue,
boolean isTemporary,
java.util.Map<java.lang.String,java.lang.Object> queueDeclareArguments)
destName - the name of the topic or queueisQueue - true if this represent a queueisTemporary - true if this is a temporary destinationqueueDeclareArguments - arguments to use when declaring the AMQP queuepublic RMQDestination(java.lang.String destName,
java.lang.String amqpExchangeName,
java.lang.String amqpRoutingKey,
java.lang.String amqpQueueName)
amqpExchangeName and amqpRoutingKey must both be null if either is null, and amqpQueueName may be null, but at
least one of these three parameters must be non-null.
destName - the name of the queue destinationamqpExchangeName - - the exchange name for the mapped resourceamqpRoutingKey - - the routing key for the mapped resourceamqpQueueName - - the queue name of the mapped resourcepublic boolean isAmqpWritable()
public boolean isAmqpReadable()
public boolean isAmqp()
true if this is an AMQP 0-9-1 mapped resource, false otherwisepublic void setAmqp(boolean amqp)
amqp - set to true if this is an AMQP 0-9-1 mapped resource, false otherwisepublic java.lang.String getAmqpQueueName()
public void setAmqpQueueName(java.lang.String amqpQueueName)
amqpQueueName - AMQP 0-9-1 queue namepublic java.lang.String getAmqpExchangeName()
public void setAmqpExchangeName(java.lang.String amqpExchangeName)
amqpExchangeName - AMQP 0-9-1 exchange name to usepublic java.lang.String getDestinationName()
public void setDestinationName(java.lang.String destinationName)
destinationName - JMS destination namepublic java.lang.String getAmqpRoutingKey()
public void setAmqpRoutingKey(java.lang.String routingKey)
routingKey - AMQP 0-9-1 routing keypublic java.lang.String getAmqpExchangeType()
public boolean noNeedToDeclareExchange()
public boolean isQueue()
public void setQueue(boolean isQueue)
isQueue - true if this is a queue, false otherwisejava.lang.IllegalStateException - if the queue has already been declared
isDeclared() return truepublic java.lang.String getTopicName()
throws javax.jms.JMSException
getTopicName in interface javax.jms.Topicjavax.jms.JMSExceptionpublic java.lang.String getQueueName()
throws javax.jms.JMSException
getQueueName in interface javax.jms.Queuejavax.jms.JMSExceptionpublic javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getQueueDeclareArguments()
public boolean isDeclared()
public void setDeclared(boolean isDeclared)
isDeclared - - set to true if the queue/topic has been defined in the
RabbitMQ brokerisDeclared()public boolean isTemporary()
true if this is a temporary destination, false otherwisepublic void delete()
throws javax.jms.JMSException
TemporaryQueues only — deletion currently occurs automatically on session close.
delete in interface javax.jms.TemporaryQueuedelete in interface javax.jms.TemporaryTopicjavax.jms.JMSExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in interface javax.jms.QueuetoString in interface javax.jms.TopictoString in class java.lang.ObjectCopyright © 2023. All rights reserved.