Package org.apache.qpid.jms
Class JmsDestination
- java.lang.Object
-
- org.apache.qpid.jms.jndi.JNDIStorable
-
- org.apache.qpid.jms.JmsDestination
-
- All Implemented Interfaces:
jakarta.jms.Destination,java.io.Externalizable,java.io.Serializable,java.lang.Comparable<JmsDestination>,javax.naming.Referenceable
- Direct Known Subclasses:
JmsQueue,JmsTemporaryDestination,JmsTopic
public abstract class JmsDestination extends JNDIStorable implements java.io.Externalizable, jakarta.jms.Destination, java.lang.Comparable<JmsDestination>
Jms Destination- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringaddressprotected JmsConnectionconnectionprotected inthashValueprotected booleantemporaryprotected booleantopic
-
Constructor Summary
Constructors Modifier Constructor Description protectedJmsDestination(java.lang.String address, boolean topic, boolean temporary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.String>buildFromProperties(java.util.Map<java.lang.String,java.lang.String> props)Set the properties that will represent the instance in JNDIintcompareTo(JmsDestination other)booleanequals(java.lang.Object o)java.lang.StringgetAddress()inthashCode()booleanisQueue()booleanisTemporary()booleanisTopic()protected voidpopulateProperties(java.util.Map<java.lang.String,java.lang.String> props)Initialize the instance from properties stored in JNDIvoidreadExternal(java.io.ObjectInput in)voidsetAddress(java.lang.String address)java.lang.StringtoString()voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class org.apache.qpid.jms.jndi.JNDIStorable
getProperties, getProperty, getReference, setProperties
-
-
-
-
Field Detail
-
address
protected transient java.lang.String address
-
topic
protected transient boolean topic
-
temporary
protected transient boolean temporary
-
hashValue
protected transient int hashValue
-
connection
protected transient JmsConnection connection
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getAddress
public java.lang.String getAddress()
- Returns:
- address of destination
-
setAddress
public void setAddress(java.lang.String address)
-
isTopic
public boolean isTopic()
- Returns:
- the topic
-
isTemporary
public boolean isTemporary()
- Returns:
- the temporary
-
isQueue
public boolean isQueue()
- Returns:
- true if a Topic
-
buildFromProperties
protected java.util.Map<java.lang.String,java.lang.String> buildFromProperties(java.util.Map<java.lang.String,java.lang.String> props)
Description copied from class:JNDIStorableSet the properties that will represent the instance in JNDI- Specified by:
buildFromPropertiesin classJNDIStorable- Parameters:
props- The properties to use when building the new isntance.- Returns:
- a new, unmodifiable, map containing any unused properties, or empty if none were.
-
populateProperties
protected void populateProperties(java.util.Map<java.lang.String,java.lang.String> props)
Description copied from class:JNDIStorableInitialize the instance from properties stored in JNDI- Specified by:
populatePropertiesin classJNDIStorable- Parameters:
props- The properties to use when initializing the new instance.
-
compareTo
public int compareTo(JmsDestination other)
- Specified by:
compareToin interfacejava.lang.Comparable<JmsDestination>- Parameters:
other- the Object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- See Also:
Comparable.compareTo(java.lang.Object)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classJNDIStorable- Throws:
java.io.IOException- See Also:
Externalizable.writeExternal(java.io.ObjectOutput)
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classJNDIStorable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException- See Also:
Externalizable.readExternal(java.io.ObjectInput)
-
-