public interface TopicDataWithMetadata
TopicData
that either have
mandatory Metadata or allow optional Metadata.
Metadata is deemed to be any of the subtypes of MNode
.
Types that have mandatory Metadata will require a specific subtype (for
example RecordTopicData
requires a type of
MMessage
) and
the Metadata would have been set during construction and cannot be changed.
Types that have optional Metadata may set any MNode
before the
TopicData is attached to a Topic.
Type with mandatory metadata will also have their own specific getMetadata
methods that will return the Metadata as the correct subtype whereas this
interface always treats Metadata as the generic MNode
type.
Modifier and Type | Method and Description |
---|---|
MNode |
getMetadataNode()
Returns the metadata associated with the TopicData.
|
boolean |
isMetadataMandatory()
Indicates whether Metadata is mandatory for the TopicData type.
|
void |
setMetadataNode(MNode metadata)
Sets Optional Metadata on the TopicData.
|
MNode getMetadataNode()
void setMetadataNode(MNode metadata) throws APIException
This can only be called for Topics with optional Metadata as those with Mandatory Metadata would have had it set on construction.
metadata
- the MetadataAPIException
- if called when Metadata is
mandatory
or if called after the
TopicData has been attached to a Topic.boolean isMetadataMandatory()
getMetadataNode()
would always return a Metadata object.
false if Metadata is optional in which case the Metadata may be
null if not explicitly set using setMetadataNode(MNode)
.Copyright © 2016 Push Technology Ltd. All Rights Reserved.