B
- the builder typeD
- the topic details typepublic static interface TopicDetails.Builder<B extends TopicDetails.Builder<B,D>,D extends TopicDetails>
This is the base builder interface which defines the setting of
attributes that are common to all topic types
. This
will be specialised for topic types that have additional attributes
and/or schema information.
Modifier and Type | Method and Description |
---|---|
D |
build()
Build topic details.
|
B |
property(String key,
String value)
Sets a topic property.
|
B |
reference(String reference)
Sets the initial value of the topic reference.
|
B |
reset()
Resets the builder to its initial values.
|
B |
tidyOnUnsubscribe(boolean tidy)
Sets the 'tidy on unsubscribe' flag.
|
B reference(String reference) throws IllegalArgumentException
If not explicitly supplied, there will be no topic reference.
reference
- the referenceIllegalArgumentException
- if reference
is nullB tidyOnUnsubscribe(boolean tidy)
By default, if a client unsubscribes from a topic, it may still receive content already queued for it on that topic.
If this option is set, when a client unsubscribes from a topic then any content for that topic that is still queued for the client is removed. There can be a performance overhead to using this option as the client queue must be locked whilst content is removed, however it may prove useful for preventing unwanted data being sent to clients.
tidy
- true to set tidy on unsubscribe. Default is falseB property(String key, String value) throws IllegalArgumentException
This is used for setting restricted or legacy topic properties.
key
- the property key. The values for these keys and permitted
values are published in the user documentationvalue
- the property value. If this is specified as null the
effect is to remove the property value if it has already been
setUnsupportedOperationException
- if the key
value is not
supportedIllegalArgumentException
- is either key
is null or
value is invalid for given keyB reset()
D build() throws IllegalStateException
IllegalStateException
- if unable to build, probably because
the builder has not been supplied with one or more mandatory
properties or is inconsistent in some wayCopyright © 2016 Push Technology Ltd. All Rights Reserved.