public final class TopicId extends Object implements Serializable
TopicId object can be used to create subscriptions
for topics that possibly reside in different projects.| Modifier and Type | Method and Description |
|---|---|
static TopicId |
deletedTopic()
Returns the identity of a deleted topic.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isDeleted()
Returns
true if this object is the identity of a deleted topic, false
otherwhise. |
static TopicId |
of(String topic)
Returns a topic identity given the topic name.
|
static TopicId |
of(String project,
String topic)
Returns a topic identity given project and topic names.
|
String |
project()
Returns the name of the project where the topic resides.
|
String |
topic()
Returns the name of the topic.
|
String |
toString() |
public String project()
null the topic is assumed
to reside in the ServiceOptions.projectId() project.public String topic()
public boolean isDeleted()
public static TopicId deletedTopic()
isDeleted()
returns true, topic() returns "_is_deleted_" and project()
returns null.Copyright © 2016 Google. All rights reserved.