public interface TopicDetails
types
.
Topic details fully describe a topic and are made up of three parts:
1) The Topic Type.
This describes the type of topic which may define a data topic and the type
of data it manages, or a functional topic.
2) The Topic Schema.
This describes the layout of the data within a data topic. A schema is
present for all topic types although some do not describe any detail.
3) The Topic Attributes.
Every topic has a set of attributes which describes aspects of its behavior.
In most cases the default attribute settings would suffice but attributes may
be tailored as required. All topic types have some common attributes and many
topic types also have attributes specific to the type.
Topic details may be defined using a builder
created using
the TopicControl
feature (see
TopicControl.newDetailsBuilder(Class)
) and used to create topics.
Alternatively, where only simple details are required there is no need to use
a builder as a simple details object for a type can be created using
TopicControl.newDetails(TopicType)
Where many topics are to have the same definition, the same topic detail can (and indeed should) be used to create many topics.
Topic details are also used to provide details of existing topics to clients. In this case schema and/or attributes may not be present in the details if that level of detail was not requested.
Subtypes of this type exist for all topic types
.
Modifier and Type | Interface and Description |
---|---|
static interface |
TopicDetails.Attributes
Topic attributes.
|
static interface |
TopicDetails.Builder<B extends TopicDetails.Builder<B,D>,D extends TopicDetails>
Topic Details builder.
|
static class |
TopicDetails.Level
The level of detail available.
|
static interface |
TopicDetails.Schema
Topic schema.
|
Modifier and Type | Method and Description |
---|---|
TopicDetails.Attributes |
getAttributes()
Returns the topic attributes.
|
TopicDetails.Level |
getLevel()
Returns the level of detail available.
|
TopicDetails.Schema |
getSchema()
Returns the topic schema.
|
TopicType |
getType()
Returns the topic type.
|
TopicDetails.Level getLevel()
TopicType getType()
The type of a topic defines its basic behavior.
This is determined by the subtype.
TopicDetails.Schema getSchema()
The schema is used to define the layout of the topic content. Only some topic types make use of a schema, for other it would be an empty definition.
TopicDetails.Level.BASIC
. This will need
to be cast to the appropriate subtype in order to retrieve type
specific detailTopicDetails.Attributes getAttributes()
There are a common set of attributes that apply to all topic types and some topic types may specialize the attributes to provide type specific information.
TopicDetails.Level.BASIC
or TopicDetails.Level.SCHEMA
. This will need to be
cast to the appropriate subtype in order to retrieve type
specific detailCopyright © 2016 Push Technology Ltd. All Rights Reserved.