Interface TopicPath
-
public interface TopicPath
Represents the path of a topic for the Ditto Protocol.A
TopicPath
complies with the scheme<namespace>/<id>/<group>/<channel>/<criterion>/<action>
for exampleorg.eclipse.ditto/myThing/things/twin/commands/modify
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TopicPath.Action
An enumeration of topic path actions.static class
TopicPath.Channel
An enumeration of topic path channel.static class
TopicPath.Criterion
An enumeration of topic path criteria.static class
TopicPath.Group
An enumeration of topic path groups.static class
TopicPath.SearchAction
An enumeration of topic path search-actions.
-
Field Summary
Fields Modifier and Type Field Description static String
ID_PLACEHOLDER
static String
PATH_DELIMITER
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static TopicPathBuilder
fromNamespace(String namespace)
Returns a mutable builder to create immutableTopicPath
instances for a givennamespace
.Optional<TopicPath.Action>
getAction()
Returns anOptional
for an action part of thisTopicPath
.TopicPath.Channel
getChannel()
Returns the channel part of thisTopicPath
.TopicPath.Criterion
getCriterion()
Returns the criterion part of thisTopicPath
.TopicPath.Group
getGroup()
Returns the group part of thisTopicPath
.String
getId()
Returns the id part of thisTopicPath
.String
getNamespace()
Returns the namespace part of thisTopicPath
.String
getPath()
Returns the path of thisTopicPath
.Optional<TopicPath.SearchAction>
getSearchAction()
Returns anOptional
for an search action part of thisTopicPath
.Optional<String>
getSubject()
Returns anOptional
for a subject part of thisTopicPath
.default boolean
isWildcardTopic()
static TopicPathBuilder
newBuilder(String thingId)
Deprecated.Thing ID is now typed.static TopicPathBuilder
newBuilder(org.eclipse.ditto.model.policies.PolicyId policyId)
Returns a mutable builder to create immutableTopicPath
instances for a givenpolicyId
.static TopicPathBuilder
newBuilder(org.eclipse.ditto.model.things.ThingId thingId)
Returns a mutable builder to create immutableTopicPath
instances for a giventhingId
.
-
-
-
Field Detail
-
ID_PLACEHOLDER
static final String ID_PLACEHOLDER
- See Also:
- Constant Field Values
-
PATH_DELIMITER
static final String PATH_DELIMITER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newBuilder
@Deprecated static TopicPathBuilder newBuilder(String thingId)
Deprecated.Thing ID is now typed. UsenewBuilder(org.eclipse.ditto.model.things.ThingId)
instead.Returns a mutable builder to create immutableTopicPath
instances for a giventhingId
.- Parameters:
thingId
- the identifier of theThing
.- Returns:
- the builder.
- Throws:
NullPointerException
- ifthingId
isnull
.
-
newBuilder
static TopicPathBuilder newBuilder(org.eclipse.ditto.model.things.ThingId thingId)
Returns a mutable builder to create immutableTopicPath
instances for a giventhingId
.- Parameters:
thingId
- the identifier of theThing
.- Returns:
- the builder.
- Throws:
NullPointerException
- ifthingId
isnull
.
-
newBuilder
static TopicPathBuilder newBuilder(org.eclipse.ditto.model.policies.PolicyId policyId)
Returns a mutable builder to create immutableTopicPath
instances for a givenpolicyId
.- Parameters:
policyId
- the identifier of thePolicy
.- Returns:
- the builder.
- Throws:
NullPointerException
- ifpolicyId
isnull
.
-
fromNamespace
static TopicPathBuilder fromNamespace(String namespace)
Returns a mutable builder to create immutableTopicPath
instances for a givennamespace
.- Parameters:
namespace
- the namespace.- Returns:
- the builder.
- Throws:
NullPointerException
- ifnamespace
isnull
.
-
getNamespace
String getNamespace()
Returns the namespace part of thisTopicPath
.- Returns:
- the namespace.
-
getGroup
TopicPath.Group getGroup()
Returns the group part of thisTopicPath
.- Returns:
- the group.
-
getChannel
TopicPath.Channel getChannel()
Returns the channel part of thisTopicPath
.- Returns:
- the channel.
-
getCriterion
TopicPath.Criterion getCriterion()
Returns the criterion part of thisTopicPath
.- Returns:
- the criterion.
-
getAction
Optional<TopicPath.Action> getAction()
Returns anOptional
for an action part of thisTopicPath
.- Returns:
- the action.
-
getSearchAction
Optional<TopicPath.SearchAction> getSearchAction()
Returns anOptional
for an search action part of thisTopicPath
.- Returns:
- the search action.
-
getSubject
Optional<String> getSubject()
Returns anOptional
for a subject part of thisTopicPath
.- Returns:
- the subject.
-
getId
String getId()
Returns the id part of thisTopicPath
.- Returns:
- the id.
-
getPath
String getPath()
Returns the path of thisTopicPath
.- Returns:
- the path.
-
isWildcardTopic
default boolean isWildcardTopic()
-
-