public enum MqttGlobalPublishFilter extends Enum<MqttGlobalPublishFilter>
Global means not filtering for individual subscriptions of a Subscribe message.
| Enum Constant and Description |
|---|
ALL
Filter matching all incoming Publish messages.
|
REMAINING
Filter matching the incoming Publish messages that are not consumed in per subscription or other global flows.
|
SUBSCRIBED
Filter matching the incoming Publish messages resulting from subscriptions made by the client.
|
UNSOLICITED
Filter matching the incoming Publish messages not resulting from any subscription made by the client.
|
| Modifier and Type | Method and Description |
|---|---|
static MqttGlobalPublishFilter |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MqttGlobalPublishFilter[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MqttGlobalPublishFilter ALL
ALL = SUBSCRIBED + UNSOLICITED.
public static final MqttGlobalPublishFilter SUBSCRIBED
SUBSCRIBED + UNSOLICITED = ALL.
public static final MqttGlobalPublishFilter UNSOLICITED
UNSOLICITED + SUBSCRIBED = ALL.
public static final MqttGlobalPublishFilter REMAINING
This filter will not match any messages if
ALL filter is used or
SUBSCRIBED and UNSOLICITED filters are used.
Example (pseudo-code):
stream1 = client.subscribePublishes("a/#")
client.subscribe("b/#")
stream2 = client.publishes(SUBSCRIBED)
stream3 = client.publishes(REMAINING)
"a/b" will be emitted in stream1 and stream2.
"b/c" will be emitted in stream2
"c/d" will be emitted in stream3 as there is no other stream registered for the
topic.
public static MqttGlobalPublishFilter[] values()
for (MqttGlobalPublishFilter c : MqttGlobalPublishFilter.values()) System.out.println(c);
public static MqttGlobalPublishFilter 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