public enum TopicType extends Enum<TopicType>
Defines the various topic types available.
Enum Constant and Description |
---|
BINARY
Binary Topic.
|
CHILD_LIST
Deprecated.
since 5.9
this topic type will be removed at a future release |
CUSTOM
Deprecated.
since 5.9
This topic type will be removed in a future release. |
JSON
JSON (JavaScript Object Notation) Topic.
|
PAGED_RECORD
Deprecated.
since 5.9
This topic type will be removed in a future release |
PAGED_STRING
Deprecated.
since 5.9
This topic type will be removed in a future release |
PROTOCOL_BUFFER
Deprecated.
since 5.7
Support for Google Protocol Buffers topics will be removed in
a future release as |
RECORD
Record Topic.
|
ROUTING
Routing Topic.
|
SERVICE
Deprecated.
since 5.7
|
SINGLE_VALUE
Single Value Topic.
|
SLAVE
Slave Topic.
|
STATELESS
Stateless Topic.
|
TOPIC_NOTIFY
Deprecated.
since 5.9
This topic type will be removed in a future release |
Modifier and Type | Method and Description |
---|---|
boolean |
isFunctional()
Deprecated.
since 5.9
Functional topics will be removed in a future release |
boolean |
isStateful()
Deprecated.
since 5.9
When functional topics are removed this method will no longer be of use and will be removed |
static TopicType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TopicType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TopicType STATELESS
A stateless topic is one that has no data state maintained at the server and performs no specific function. Such a topic would normally be used simply to act an organisational node within the topic tree but may also be used for sending messages.
StatelessTopicDetails
public static final TopicType SINGLE_VALUE
This is a isStateful()
topic that maintains its state as a
single String value which may optionally be validated and constrained by
type (e.g. integer, decimal or custom values). The type is defined by an
item of field
metadata.
SingleValueTopicDetails
public static final TopicType RECORD
This is a stateful
topic that maintains its state
in record format. The format of the topic content may be one or more
Records as defined by an item of MContent
metadata. When such a
topic is updated, the metadata is used to interpret the data and make
comparisons between the current topic state and the update such that a
delta of change can be calculated for publishing to subscribed clients.
RecordTopicDetails
@Deprecated public static final TopicType PROTOCOL_BUFFER
Support for Google Protocol Buffers topics will be removed in
a future release as binary
topics can be used
to distribute protocol buffer messages.
A stateful
topic that maintains its state in Google
Protocol Buffers format. The format of the data is described by a single
Protocol Buffers message description. When such a topic is updated, the
message description is used to interpret the data and make comparisons
between the current topic state and the update such that a delta of
change can be calculated for publishing to subscribed clients.
ProtocolBufferTopicDetails
@Deprecated public static final TopicType CUSTOM
This topic type will be removed in a future release.
A stateful
topic that maintains its state via a
user written Java class deployed at the server.
CustomTopicDetails
public static final TopicType SLAVE
A topic that references another topic (the master topic) which has data (i.e. an alias). It effectively allows a topic's data to be shared across more than one topic node.
A client cannot tell that it is subscribed to a slave topic. A client requesting details of a slave topic will receive the details of the master topic. A client subscribing to the slave topic will receive all updates to the master topic. The slave topic itself may not be updated.
Any number of slave topics may reference the same master topic.
If a topic is removed that referenced by slave topics, all such slave topics are also automatically removed.
SlaveTopicDetails
@Deprecated public static final TopicType SERVICE
Messaging
and MessagingControl
are a better
alternative to Service Topics for sending point-to-point
requests.
A functional
topic that enables asynchronous
request/response calls.
Currently only clients using the classic API can interact with such a topic.
Such a topic will have its functionality provided by a user written Java class deployed at the server.
ServiceTopicDetails
@Deprecated public static final TopicType PAGED_STRING
This topic type will be removed in a future release
A functional
topic that maintains its state as a
list of Strings which individual clients can page through and be
dynamically notified of changes.
Currently paged topics may only be used by user of the classic API.
Such a topic may be updated by a client using the PagingControl
feature.
PagedStringTopicDetails
@Deprecated public static final TopicType PAGED_RECORD
This topic type will be removed in a future release
A functional
Topic that maintains its state as a
List of Records
which individual Clients can page through
and be dynamically notified of changes.
Currently paged topics may only be used by user of the classic API.
Such a topic may be updated by a client using the PagingControl
feature.
PagedRecordTopicDetails
@Deprecated public static final TopicType TOPIC_NOTIFY
This topic type will be removed in a future release
A functional
topic that allows clients to be
notified of the addition and removal of other topics.
Currently only users of the classic API can access such topics.
TopicNotifyTopicDetails
public static final TopicType ROUTING
A functional
topic that can reference different
source topics for different clients.
Each subscription to a routing topic is routed to a source topic. Updates to the source topic are routed back to the subscriber and appear to come from the routing topic.
The result is that a client may subscribe to a topic which is in reality supported by another topic and the mapping of the routing topic to the actual topic can be different for each client.
As an example, you may wish for all clients to simply subscribe to a topic called "Prices" but depending upon the client type the actual topic could differ (Prices/Discount, Prices/Standard etc).
An instance of this topic may map any number of clients to any number of
different 'real' topics. Each real topic must be either a
stateful
topic or a stateless
topic (i.e. not a functional
topic).
From the point of view of a client subscribing to such a topic this would be seen as a normal topic but it has no state of its own and cannot be updated.
By default, the mapping of clients to source topics is performed by a
control client using the SubscriptionControl
feature. When a
client subscribes to the routing topic the control client is requested to
provide the topic that the client is to be subscribed to. If there is no
control client available to handle subscriptions at the time a client
subscribed, the client will not be subscribed to the topic.
Alternatively the routing can be determined by a user written Java class (deployed on the server) which will be invoked to define the mapping of the topic to another data topic when a client subscribes.
When a source topic is removed that is mapped to from a routing topic then any clients that were mapped to that source topic will be unsubscribed from the routing topic.
RoutingTopicDetails
@Deprecated public static final TopicType CHILD_LIST
this topic type will be removed at a future release
A functional
topic that automatically maintains a
list of its children and notifies subscribers of changes when a child is
added or removed.
Currently only users of the classic API can access such topics.
ChildListTopicDetails
public static final TopicType JSON
This is a stateful topic that handles data in JSON representation.
public static final TopicType BINARY
This is a stateful topic that handles data in Binary format.
public static TopicType[] values()
for (TopicType c : TopicType.values()) System.out.println(c);
public static TopicType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Deprecated public boolean isStateful()
When functional topics are removed this method will no longer be of use and will be removed
A stateful topic has data managed at the server.
@Deprecated public boolean isFunctional()
Functional topics will be removed in a future release
Generally speaking a functional topic is one that performs some function other than maintaining and publishing data in the normal manner. Some functional topics have no state at the server and simply enable certain features whereas others may maintain some server side state but this state may only be updated using specialised features.
Copyright © 2016 Push Technology Ltd. All Rights Reserved.