com.objectspace.voyager.space.publishing
Class Topic
java.lang.Object
|
+--com.objectspace.voyager.space.publishing.Topic
- public class Topic
- extends java.lang.Object
- implements java.io.Serializable
A topic is specified hierarchically with fields separated by periods, like sports.bulls
and books.fiction.mystery. The asterisk (*) wild card matches the next field, and the
left angle bracket (<) matches all remaining fields. Both publishers and subscribers
can use wildcards to match against a range of topics.
- Version:
- 3.0
- See Also:
- Serialized Form
Constructor Summary |
Topic(java.lang.String topic)
Construct myself to be the specified topic. |
Method Summary |
boolean |
equals(java.lang.Object object)
Return true if the specified object is a Topic that matches
me exactly, string for string, wildcard for wildcard. |
int |
hashCode()
Return my hashcode. |
boolean |
matches(Topic topic)
Return true if I match the specified topic. |
java.lang.String |
toString()
Return a string that describes me. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Topic
public Topic(java.lang.String topic)
- Construct myself to be the specified topic.
- Parameters:
topic
- My initial value.
equals
public boolean equals(java.lang.Object object)
- Return true if the specified object is a Topic that matches
me exactly, string for string, wildcard for wildcard.
- Parameters:
object
- The object to compare against.- Overrides:
- equals in class java.lang.Object
toString
public java.lang.String toString()
- Return a string that describes me.
- Overrides:
- toString in class java.lang.Object
hashCode
public int hashCode()
- Return my hashcode.
- Overrides:
- hashCode in class java.lang.Object
matches
public boolean matches(Topic topic)
- Return true if I match the specified topic.
Wildcards are honored in both myself and the argument.
- Parameters:
topic
- The topic to match against.
(c) Copyright 1997-1999 ObjectSpace, Inc.
14850 Quorum Drive, Suite 500
Dallas, Texas 75240