public class TopicKey extends Object implements Serializable
Immutable TopicKey class encapsulates address of the particular topic.
In order to support reuse of the same topic (e.g. JMS topic) for different application message topics, TopicKey contains topic name and sub-topic name separated with ‘@’.
Application specifies TopicKey when publishing messages as topic address.
Modifier and Type | Field and Description |
---|---|
static char |
SUBCHANNEL_SEPARATOR |
Constructor and Description |
---|
TopicKey(String topicAddress)
Constructs new topic by providing a topic address in format 'subtopic@topic'
|
TopicKey(String topicName,
String subtopicName)
Contrstructs new topic by providing a name of the topic and a name of a subtopic.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static com.google.common.base.Function<String,TopicKey> |
factory()
Returns the function for creating
TopicKey s from strings. |
TopicKey |
getRootTopicKey()
Returns the
TopicKey that identifies topic without subtopic. |
String |
getSubtopicName()
Returns name of the subtopic
|
String |
getTopicAddress()
Returns whole address of topic in format 'subtopic@topic'
|
String |
getTopicName()
Returns name of the topic
|
int |
hashCode() |
static com.google.common.base.Function<TopicKey,String> |
toAddress()
Returns a function for converting
TopicKey to address strings in format 'subtopic@topic'. |
String |
toString() |
public static final char SUBCHANNEL_SEPARATOR
public TopicKey(String topicAddress)
public String getTopicName()
public String getSubtopicName()
public String getTopicAddress()
public TopicKey getRootTopicKey()
public static com.google.common.base.Function<String,TopicKey> factory()
TopicKey
s from strings.Copyright © 2015 JBoss by Red Hat. All Rights Reserved.