org.fusesource.stompjms
Class StompJmsDestination

java.lang.Object
  extended by org.fusesource.stompjms.jndi.JNDIStorable
      extended by org.fusesource.stompjms.StompJmsDestination
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Comparable<StompJmsDestination>, javax.jms.Destination, javax.naming.Referenceable
Direct Known Subclasses:
StompJmsQueue, StompJmsTempQueue, StompJmsTempTopic, StompJmsTopic

public abstract class StompJmsDestination
extends JNDIStorable
implements java.io.Externalizable, javax.jms.Destination, java.lang.Comparable<StompJmsDestination>

Jms Destination

See Also:
Serialized Form

Field Summary
protected  org.fusesource.hawtbuf.AsciiBuffer buffer
           
protected  int hashValue
           
protected  java.lang.String physicalName
           
static java.lang.String QUEUE_QUALIFIED_PREFIX
           
static java.lang.String TEMP_QUEUE_QUALIFED_PREFIX
           
static java.lang.String TEMP_TOPIC_QUALIFED_PREFIX
           
protected  boolean temporary
           
protected  boolean topic
           
static java.lang.String TOPIC_QUALIFIED_PREFIX
           
protected  java.lang.String toString
           
 
Constructor Summary
protected StompJmsDestination(java.lang.String name)
           
 
Method Summary
protected  void buildFromProperties(java.util.Map<java.lang.String,java.lang.String> props)
          Set the properties that will represent the instance in JNDI
 int compareTo(StompJmsDestination other)
           
static StompJmsDestination createDestination(java.lang.String name)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getPhysicalName()
           
protected abstract  java.lang.String getType()
           
 int hashCode()
           
 boolean isQueue()
           
 boolean isTemporary()
           
 boolean isTopic()
           
protected  void populateProperties(java.util.Map<java.lang.String,java.lang.String> props)
          Initialize the instance from properties stored in JNDI
 void readExternal(java.io.ObjectInput in)
           
 org.fusesource.hawtbuf.AsciiBuffer toBuffer()
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class org.fusesource.stompjms.jndi.JNDIStorable
getProperties, getProperty, getReference, setProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUEUE_QUALIFIED_PREFIX

public static final java.lang.String QUEUE_QUALIFIED_PREFIX
See Also:
Constant Field Values

TOPIC_QUALIFIED_PREFIX

public static final java.lang.String TOPIC_QUALIFIED_PREFIX
See Also:
Constant Field Values

TEMP_QUEUE_QUALIFED_PREFIX

public static final java.lang.String TEMP_QUEUE_QUALIFED_PREFIX
See Also:
Constant Field Values

TEMP_TOPIC_QUALIFED_PREFIX

public static final java.lang.String TEMP_TOPIC_QUALIFED_PREFIX
See Also:
Constant Field Values

physicalName

protected transient java.lang.String physicalName

topic

protected transient boolean topic

temporary

protected transient boolean temporary

hashValue

protected transient int hashValue

toString

protected transient java.lang.String toString

buffer

protected transient org.fusesource.hawtbuf.AsciiBuffer buffer
Constructor Detail

StompJmsDestination

protected StompJmsDestination(java.lang.String name)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toBuffer

public org.fusesource.hawtbuf.AsciiBuffer toBuffer()

getType

protected abstract java.lang.String getType()

getPhysicalName

public java.lang.String getPhysicalName()
Returns:
name of destination

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 void buildFromProperties(java.util.Map<java.lang.String,java.lang.String> props)
Description copied from class: JNDIStorable
Set the properties that will represent the instance in JNDI

Specified by:
buildFromProperties in class JNDIStorable
Parameters:
props -

populateProperties

protected void populateProperties(java.util.Map<java.lang.String,java.lang.String> props)
Description copied from class: JNDIStorable
Initialize the instance from properties stored in JNDI

Specified by:
populateProperties in class JNDIStorable
Parameters:
props -

compareTo

public int compareTo(StompJmsDestination other)
Specified by:
compareTo in interface java.lang.Comparable<StompJmsDestination>
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:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class JNDIStorable
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:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class JNDIStorable
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Externalizable.readExternal(java.io.ObjectInput)

createDestination

public static StompJmsDestination createDestination(java.lang.String name)
                                             throws javax.jms.InvalidDestinationException
Throws:
javax.jms.InvalidDestinationException


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.