|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrun.jms.core.client.JmsTopic
A topic is a destination specific for the puiblish-subscribe messaging model. OpenJMS also supports topic hierarchy and wild carding.
org.exolab.jms.client.JmsDestination, Serialized Form| Field Summary | |
static java.lang.String |
ALL_WILDCARD
|
static java.lang.String |
SEPARATOR
|
static java.lang.String |
WILDCARD
|
| Constructor Summary | |
JmsTopic()
Need a default constructor for the serialization |
|
JmsTopic(java.lang.String name)
Instantiate an instance of this object with the specified string |
|
| Method Summary | |
boolean |
equals(java.lang.Object object)
|
javax.naming.Reference |
getReference()
|
java.lang.String |
getTopicName()
Return the name of the topic |
int |
hashCode()
|
boolean |
isWildCard()
Check whether this topic represents a wildcard expression. |
boolean |
match(JmsTopic destination)
If it is a wildcard check to see that it matches the specified topic. |
void |
readExternal(java.io.ObjectInput stream)
|
void |
writeExternal(java.io.ObjectOutput stream)
|
| Field Detail |
public static final java.lang.String WILDCARD
public static final java.lang.String ALL_WILDCARD
public static final java.lang.String SEPARATOR
| Constructor Detail |
public JmsTopic()
public JmsTopic(java.lang.String name)
name - name of the queue| Method Detail |
public java.lang.String getTopicName()
throws javax.jms.JMSException
JMSException - public boolean equals(java.lang.Object object)
public void writeExternal(java.io.ObjectOutput stream)
throws java.io.IOException
writeExternal in interface java.io.Externalizable
public void readExternal(java.io.ObjectInput stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablepublic int hashCode()
public boolean isWildCard()
throws javax.jms.JMSException
JMSException - error in retrieving destpublic boolean match(JmsTopic destination)
Note we treat "a.b.c.*.*" and "a.b.c" as not a match at this stage, since the wildcard is attempting to match more levels than exist in the topic. if this proves to be unpopular with the masses, its a very trivial change below to fix this problem.
Tokens are compared and must either be identical or the wildcard token must be a "*" to match at this level. Once a mismatch is detected the comparison is stopped and a false returned.
NOTE: This check assumes both the topic and wildcard topic have both already been validated. if the topics are inavlid this test can return arbitrary results.
destination - The specific topic to match topublic javax.naming.Reference getReference()
getReference in interface javax.naming.Referenceable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||