Interface ModifiableSubscription
-
- All Superinterfaces:
Subscription
@DoNotImplement public interface ModifiableSubscription extends Subscription
A copy of aSubscription
that can be modified for onward delivery.- Since:
- 4.2.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setNoLocal(boolean noLocal)
Set the no local flag of the subscription.void
setQos(@NotNull Qos qos)
Set the QoS of the subscription.void
setRetainAsPublished(boolean retainAsPublished)
Set the retain as published flag of the subscription.void
setRetainHandling(@NotNull RetainHandling retainHandling)
Set the retain handling of the subscription.void
setTopicFilter(@NotNull String topicFilter)
Sets the topic filter.-
Methods inherited from interface com.hivemq.extension.sdk.api.packets.subscribe.Subscription
getNoLocal, getQos, getRetainAsPublished, getRetainHandling, getTopicFilter
-
-
-
-
Method Detail
-
setTopicFilter
void setTopicFilter(@NotNull String topicFilter)
Sets the topic filter.- Parameters:
topicFilter
- The topic filter to set.- Throws:
NullPointerException
- If the topic filter is null.IllegalArgumentException
- If the topic filter is empty.IllegalArgumentException
- If the topic filter contains invalid UTF-8 characters.IllegalArgumentException
- If the topic filter is longer than the configured maximum. Default maximum length is 65535.IllegalArgumentException
- If the topic filter contains a wildcard and wildcards are disabled by HiveMQ. Default is enabled.IllegalArgumentException
- If the topic filter is a shared subscription and shared subscriptions are disabled by HiveMQ. Default is enabled.IllegalArgumentException
- If the topic filter is a shared subscription and the no local flag is set to true.- Since:
- 4.2.0, CE 2020.1
-
setQos
void setQos(@NotNull Qos qos)
Set the QoS of the subscription.- Parameters:
qos
- TheQos
to set.- Throws:
NullPointerException
- If qos is null.IllegalArgumentException
- If qos is greater than the configured maximum.- Since:
- 4.2.0, CE 2020.1
-
setRetainHandling
void setRetainHandling(@NotNull RetainHandling retainHandling)
Set the retain handling of the subscription.- Parameters:
retainHandling
- TheRetainHandling
to set.- Throws:
NullPointerException
- If the retain handling is null.- Since:
- 4.2.0, CE 2020.1
-
setRetainAsPublished
void setRetainAsPublished(boolean retainAsPublished)
Set the retain as published flag of the subscription.- Parameters:
retainAsPublished
- The retain as published flag to set.- Since:
- 4.2.0, CE 2020.1
-
setNoLocal
void setNoLocal(boolean noLocal)
Set the no local flag of the subscription.- Parameters:
noLocal
- The no local flag to set.- Throws:
IllegalArgumentException
- If true and the subscription is a shared subscription.- Since:
- 4.2.0, CE 2020.1
-
-