public interface SubscriptionControl extends Feature
Requests to subscribe sessions to topics can be submitted at any time even if
the topics do not exist at the server. Topic selectors
are used on subscription to match against topics at the server. The session
will become subscribed to any topics that exist at the server that match the
selector (unless they are already subscribed, or the session has insufficient
permission). The subscription request is also retained at the server so that
if any newly created topics match the selector, the session will then become
subscribed to it (unless a subsequent unsubscription cancels it).
Specific sessions may be subscribed/unsubscribed if the SessionId
is
known.
Subscriptions may also be requested using 'session filters' (see
Session
for a full description of session filters), where all
sessions that satisfy a particular filter expression will be
subscribed/unsubscribed. The filter is only evaluated once against the
current sessions that exist at the time - it is not retained and applied to
any sessions that are created later. In order to be notified of new sessions
as they are created session properties
listeners
can be used and those sessions subscribed as required based upon
their session properties.
A handler for routing topics belonging to a branch of the topic tree can be
added using
addRoutingSubscriptionHandler()
. When another session subscribes to one of
the routing topics, the handler will be called to determine the appropriate
source topic.
MODIFY_SESSION
permission, and
SELECT_TOPIC
permission for the path
prefix of the topic selector used for subscription. The subscribed sessions
will only be subscribed to matching topics for which they have
READ_TOPIC
permission.
To unsubscribe other sessions, a session must have
MODIFY_SESSION
permission.
To register a routing subscription
handler
the session needs VIEW_SESSION
, MODIFY_SESSION
and
REGISTER_HANDLER
permissions.
When handling a subscription request to a routing topic via a routing handler
the routing session needs READ_TOPIC
permission to both the routing topic being subscribed to and the target topic
that is assigned.
Operations that identify sessions using a session filter require the
VIEW_SESSION
permission.
session
as follows:
SubscriptionControl subsControl = session.feature(SubscriptionControl.class);
Modifier and Type | Interface and Description |
---|---|
static interface |
SubscriptionControl.RoutingSubscriptionRequest
A single request from a session to subscribe to routing topic.
|
static interface |
SubscriptionControl.SubscriptionByFilterCallback
Callback interface for filtered subscriptions and unsubscriptions.
|
static interface |
SubscriptionControl.SubscriptionByFilterContextCallback<C>
Callback interface for filtered subscriptions and unsubscriptions that
have an associated context.
|
static interface |
SubscriptionControl.SubscriptionByFilterResult
Result used by CompletableFuture variants of
subscribeByFilter and
unsubscribeByFilter . |
static interface |
SubscriptionControl.SubscriptionCallback
Callback interface to receive status notifications for subscription and
unsubscription operations.
|
static interface |
SubscriptionControl.SubscriptionContextCallback<C>
Contextual callback interface to receive status notifications for
subscription and unsubscription operations.
|
Modifier and Type | Method and Description |
---|---|
void |
addRoutingSubscriptionHandler(String topicPath,
SubscriptionControl.RoutingSubscriptionRequest.Handler handler)
Adds a handler for
routing topics that belong
to a branch of the topic tree. |
CompletableFuture<Registration> |
addRoutingSubscriptionHandler(String topicPath,
SubscriptionControl.RoutingSubscriptionRequest.RoutingHandler handler)
Adds a handler for
routing topics that belong
to a branch of the topic tree. |
CompletableFuture<?> |
subscribe(SessionId sessionId,
String topics)
Subscribe another session to topics.
|
<C> void |
subscribe(SessionId sessionId,
String topics,
C context,
SubscriptionControl.SubscriptionContextCallback<C> callback)
Subscribe another session to topics.
|
void |
subscribe(SessionId sessionId,
String topics,
SubscriptionControl.SubscriptionCallback callback)
Subscribe another session to topics.
|
CompletableFuture<?> |
subscribe(SessionId sessionId,
TopicSelector topics)
Subscribe another session to topics.
|
<C> void |
subscribe(SessionId sessionId,
TopicSelector topics,
C context,
SubscriptionControl.SubscriptionContextCallback<C> callback)
Subscribe another session to topics.
|
void |
subscribe(SessionId sessionId,
TopicSelector topics,
SubscriptionControl.SubscriptionCallback callback)
Subscribe another session to topics.
|
CompletableFuture<SubscriptionControl.SubscriptionByFilterResult> |
subscribeByFilter(String filter,
String topics)
Subscribe sessions that satisfy a given session filter to topics.
|
<C> void |
subscribeByFilter(String filter,
String topics,
C context,
SubscriptionControl.SubscriptionByFilterContextCallback<C> callback)
Subscribe sessions that satisfy a given session filter to topics.
|
void |
subscribeByFilter(String filter,
String topics,
SubscriptionControl.SubscriptionByFilterCallback callback)
Subscribe sessions that satisfy a given session filter to topics.
|
CompletableFuture<SubscriptionControl.SubscriptionByFilterResult> |
subscribeByFilter(String filter,
TopicSelector topics)
Subscribe sessions that satisfy a given session filter to topics.
|
<C> void |
subscribeByFilter(String filter,
TopicSelector topics,
C context,
SubscriptionControl.SubscriptionByFilterContextCallback<C> callback)
Subscribe sessions that satisfy a given session filter to topics.
|
void |
subscribeByFilter(String filter,
TopicSelector topics,
SubscriptionControl.SubscriptionByFilterCallback callback)
Subscribe sessions that satisfy a given session filter to topics.
|
CompletableFuture<?> |
unsubscribe(SessionId sessionId,
String topics)
Unsubscribe another session from topics.
|
<C> void |
unsubscribe(SessionId sessionId,
String topics,
C context,
SubscriptionControl.SubscriptionContextCallback<C> callback)
Unsubscribe another session from topics.
|
void |
unsubscribe(SessionId sessionId,
String topics,
SubscriptionControl.SubscriptionCallback callback)
Unsubscribe another session from topics.
|
CompletableFuture<?> |
unsubscribe(SessionId sessionId,
TopicSelector topics)
Unsubscribe another session from topics.
|
<C> void |
unsubscribe(SessionId sessionId,
TopicSelector topics,
C context,
SubscriptionControl.SubscriptionContextCallback<C> callback)
Unsubscribe another session from topics.
|
void |
unsubscribe(SessionId sessionId,
TopicSelector topics,
SubscriptionControl.SubscriptionCallback callback)
Unsubscribe another session from topics.
|
CompletableFuture<SubscriptionControl.SubscriptionByFilterResult> |
unsubscribeByFilter(String filter,
String topics)
Unsubscribe sessions that satisfy a given session filter from topics.
|
<C> void |
unsubscribeByFilter(String filter,
String topics,
C context,
SubscriptionControl.SubscriptionByFilterContextCallback<C> callback)
Unsubscribe sessions that satisfy a given session filter from topics.
|
void |
unsubscribeByFilter(String filter,
String topics,
SubscriptionControl.SubscriptionByFilterCallback callback)
Unsubscribe sessions that satisfy a given session filter from topics.
|
CompletableFuture<SubscriptionControl.SubscriptionByFilterResult> |
unsubscribeByFilter(String filter,
TopicSelector topics)
Unsubscribe sessions that satisfy a given session filter from topics.
|
<C> void |
unsubscribeByFilter(String filter,
TopicSelector topics,
C context,
SubscriptionControl.SubscriptionByFilterContextCallback<C> callback)
Unsubscribe sessions that satisfy a given session filter from topics.
|
void |
unsubscribeByFilter(String filter,
TopicSelector topics,
SubscriptionControl.SubscriptionByFilterCallback callback)
Unsubscribe sessions that satisfy a given session filter from topics.
|
getSession
CompletableFuture<Registration> addRoutingSubscriptionHandler(String topicPath, SubscriptionControl.RoutingSubscriptionRequest.RoutingHandler handler)
routing
topics that belong
to a branch of the topic tree. When another session subscribes to one of
the routing topics, the handler will be called to determine the
appropriate source topic.
For each subscription to the routing topic, the server will select a handler registered for the most specific branch. If multiple handlers are registered for the same branch, the server will select one of them arbitrarily.
topicPath
- identifies the branch of the topic tree to associate the
handler withhandler
- the handler to use for routing topics at or below the
specified path (unless there is a handler registered for a more
specific topic path)
If registration was successful, the CompletableFuture will
complete successfully with a Registration
which can be
used to unregister the handler.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
HandlerConflictException
– if the session has
already registered a routing subscription handler for
topicPath
;
SessionSecurityException
– if the session does
not have REGISTER_HANDLER
permission;
SessionSecurityException
– if the session does
not have VIEW_SESSION
permission;
SessionSecurityException
– if the session does
not have MODIFY_SESSION
permission;
SessionClosedException
– if the session is
closed.
void addRoutingSubscriptionHandler(String topicPath, SubscriptionControl.RoutingSubscriptionRequest.Handler handler)
routing
topics that belong
to a branch of the topic tree. When another session subscribes to one of
the routing topics, the handler will be called to determine the
appropriate source topic.
The CompletableFuture-based alternative
addRoutingSubscriptionHandler(String, RoutingHandler)
should be
preferred since it provides better error reporting.
For each subscription to the routing topic, the server will select a handler registered for the most specific branch. If multiple handlers are registered for the same branch, the server will select one of them arbitrarily.
topicPath
- identifies the branch of the topic tree to associate the
handler withhandler
- the handler to use for routing topics at or below the
specified path (unless there is a handler registered for a
more specific topic path)CompletableFuture<?> subscribe(SessionId sessionId, String topics) throws IllegalArgumentException
This is equivalent to calling
subscribe(SessionId, TopicSelector)
with a selector parsed using
TopicSelectors.parse(String)
.
sessionId
- identifies the session to subscribetopics
- the topics to subscribe to specified as a
TopicSelector
expressionIf the subscription was accepted, the CompletableFuture will complete successfully. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
permission;
SessionSecurityException
– if the calling
session does not have SELECT_TOPIC
permission for the
path prefix of the selector expression ;
NoSuchSessionException
– if there is no session
with the given sessionId
;
SessionClosedException
– if the session is
closed.
IllegalArgumentException
- if topics
is not a valid
selector expressionCompletableFuture<?> subscribe(SessionId sessionId, TopicSelector topics)
New subscriptions will be established for existing topics that match the
provided topic selector and for which the subscribed session has
READ_TOPIC
permission. The topic selector will be added to the
topic selections of the subscribed session, and re-evaluated when new
topics are added or the session's security roles change.
A session that does not have SELECT_TOPIC
permission for a topic
cannot subscribe directly, but can be subscribed indirectly using this
method.
sessionId
- identifies the session to subscribetopics
- identifies the topics to subscribe toIf the subscription was accepted, the CompletableFuture will complete successfully. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
permission;
SessionSecurityException
– if the calling
session does not have SELECT_TOPIC
permission for the
path prefix of the selector expression ;
NoSuchSessionException
– if there is no session
with the given sessionId
;
SessionClosedException
– if the session is
closed.
void subscribe(SessionId sessionId, String topics, SubscriptionControl.SubscriptionCallback callback) throws IllegalArgumentException
This is equivalent to calling
subscribe(SessionId, TopicSelector, SubscriptionCallback)
with a
selector parsed using TopicSelectors.parse(String)
.
sessionId
- identifies the session to subscribetopics
- the topics to subscribe to specified as a
TopicSelector
expressioncallback
- provides callback methods to indicate success or failureIllegalArgumentException
- if topics
is not a valid
selector expressionvoid subscribe(SessionId sessionId, TopicSelector topics, SubscriptionControl.SubscriptionCallback callback)
New subscriptions will be established for existing topics that match the
provided topic selector and for which the subscribed session has
READ_TOPIC
permission. The topic selector will be added to the
topic selections of the subscribed session, and re-evaluated when new
topics are added or the session's security roles change.
A session that does not have SELECT_TOPIC
permission for a topic
cannot subscribe directly, but can be subscribed indirectly using this
method.
sessionId
- identifies the session to subscribetopics
- identifies the topics to subscribe tocallback
- provides callback methods to indicate success or failure<C> void subscribe(SessionId sessionId, String topics, C context, SubscriptionControl.SubscriptionContextCallback<C> callback) throws IllegalArgumentException
This is equivalent to calling
subscribe(SessionId, TopicSelector, Object, SubscriptionContextCallback)
with a selector parsed using TopicSelectors.parse(String)
.
C
- context object typesessionId
- identifies the session to subscribetopics
- the topics to subscribe to specified as a
TopicSelector
expressioncontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods to indicate success or failureIllegalArgumentException
- if topics
is not a valid
selector expression<C> void subscribe(SessionId sessionId, TopicSelector topics, C context, SubscriptionControl.SubscriptionContextCallback<C> callback)
New subscriptions will be established for existing topics that match the
provided topic selector and for which the subscribed session has
READ_TOPIC
permission. The topic selector will be added to the
topic selections of the subscribed session, and re-evaluated when new
topics are added or the session's security roles change.
A session that does not have SELECT_TOPIC
permission for a topic
cannot subscribe directly, but can be subscribed indirectly using this
method.
C
- context object typesessionId
- identifies the session to subscribetopics
- identifies the topics to subscribe tocontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods to indicate success or failureCompletableFuture<?> unsubscribe(SessionId sessionId, String topics) throws IllegalArgumentException
This is equivalent to calling
unsubscribe(SessionId, TopicSelector)
with a selector parsed
using TopicSelectors.parse(String)
.
sessionId
- identifies the session to unsubscribetopics
- the topics to unsubscribe specified as a
TopicSelector
expressionIf the unsubscription was accepted, the CompletableFuture will complete successfully. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
permission;
NoSuchSessionException
– if there is no session
with the given sessionId
;
SessionClosedException
– if the session is
closed.
IllegalArgumentException
- if topics
is not a valid
selector expressionCompletableFuture<?> unsubscribe(SessionId sessionId, TopicSelector topics)
sessionId
- identifies the session to unsubscribetopics
- the topics to unsubscribe fromIf the unsubscription was accepted, the CompletableFuture will complete successfully. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
permission;
NoSuchSessionException
– if there is no session
with the given sessionId
;
SessionClosedException
– if the session is
closed.
void unsubscribe(SessionId sessionId, String topics, SubscriptionControl.SubscriptionCallback callback) throws IllegalArgumentException
This is equivalent to calling
unsubscribe(SessionId, TopicSelector, SubscriptionCallback)
with a selector parsed using TopicSelectors.parse(String)
.
sessionId
- identifies the session to unsubscribetopics
- the topics to unsubscribe specified as a
TopicSelector
expressioncallback
- provides callback methods indicating the status of this
operationIllegalArgumentException
- if topics
is not a valid
selector expressionvoid unsubscribe(SessionId sessionId, TopicSelector topics, SubscriptionControl.SubscriptionCallback callback)
sessionId
- identifies the session to unsubscribetopics
- the topics to unsubscribe fromcallback
- provides callback methods indicating the status of this
operation<C> void unsubscribe(SessionId sessionId, String topics, C context, SubscriptionControl.SubscriptionContextCallback<C> callback) throws IllegalArgumentException
This is equivalent to calling
unsubscribe(SessionId, TopicSelector, Object, SubscriptionContextCallback)
with a selector parsed using TopicSelectors.parse(String)
.
C
- context object typesessionId
- identifies the session to unsubscribetopics
- the topics to unsubscribe specified as a
TopicSelector
expressioncontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods indicating the status of this
operationIllegalArgumentException
- if topics
is not a valid
selector expression<C> void unsubscribe(SessionId sessionId, TopicSelector topics, C context, SubscriptionControl.SubscriptionContextCallback<C> callback)
C
- context object typesessionId
- identifies the session to unsubscribetopics
- the topics to unsubscribe fromcontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods indicating the status of this
operationCompletableFuture<SubscriptionControl.SubscriptionByFilterResult> subscribeByFilter(String filter, String topics) throws IllegalArgumentException
This is equivalent to calling
subscribeByFilter(String, TopicSelector)
with a selector parsed
using TopicSelectors.parse(String)
.
filter
- the session filter expressiontopics
- the topics to subscribe to specified as a
TopicSelector
expression
If the subscription was accepted, the CompletableFuture will
complete successfully with a SubscriptionControl.SubscriptionByFilterResult
.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
InvalidFilterException
– if the filter is
invalid;
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
and
VIEW_SESSION
global permissions;
SessionSecurityException
– if the calling
session does not have SELECT_TOPIC
permission for the
path prefix of the selector expression;
SessionClosedException
– if the session is
closed.
IllegalArgumentException
- if topics
is not a valid
selector expressionCompletableFuture<SubscriptionControl.SubscriptionByFilterResult> subscribeByFilter(String filter, TopicSelector topics)
For each session that matches the filter, new subscriptions will be
established for existing topics that match the provided topic selector
and for which the sessions has READ_TOPIC
permission. The topic
selector will be added to the topic selections of the subscribed session,
and re-evaluated when new topics are added or the session's security
roles change.
A session that does not have SELECT_TOPIC
permission for a topic
cannot subscribe directly, but can be subscribed indirectly using this
method.
filter
- the session filter expressiontopics
- the topics to subscribe to specified as a
TopicSelector
expression
If the subscription was accepted, the CompletableFuture will
complete successfully with a SubscriptionControl.SubscriptionByFilterResult
.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
InvalidFilterException
– if the filter is
invalid;
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
and
VIEW_SESSION
permissions;
SessionSecurityException
– if the calling
session does not have SELECT_TOPIC
permission for the
path prefix of the selector expression;
SessionClosedException
– if the session is
closed.
void subscribeByFilter(String filter, String topics, SubscriptionControl.SubscriptionByFilterCallback callback) throws IllegalArgumentException
This is equivalent to calling
subscribeByFilter(String, TopicSelector, SubscriptionByFilterCallback)
with a selector parsed using TopicSelectors.parse(String)
.
filter
- the session filter expressiontopics
- the topics to subscribe to specified as a
TopicSelector
expressioncallback
- provides callback methods to indicate success or failureIllegalArgumentException
- if topics
is not a valid
selector expressionvoid subscribeByFilter(String filter, TopicSelector topics, SubscriptionControl.SubscriptionByFilterCallback callback)
For each session that matches the filter, new subscriptions will be
established for existing topics that match the provided topic selector
and for which the sessions has READ_TOPIC
permission. The topic
selector will be added to the topic selections of the subscribed session,
and re-evaluated when new topics are added or the session's security
roles change.
A session that does not have SELECT_TOPIC
permission for a topic
cannot subscribe directly, but can be subscribed indirectly using this
method.
filter
- the session filter expressiontopics
- identifies the topics to subscribe tocallback
- provides callback methods to indicate success or failure<C> void subscribeByFilter(String filter, String topics, C context, SubscriptionControl.SubscriptionByFilterContextCallback<C> callback) throws IllegalArgumentException
This is equivalent to calling
subscribeByFilter(String, TopicSelector, Object, SubscriptionByFilterContextCallback)
with a selector parsed using TopicSelectors.parse(String)
.
C
- context object typefilter
- the session filter expressiontopics
- the topics to subscribe to specified as a
TopicSelector
expressioncontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods to indicate success or failureIllegalArgumentException
- if topics
is not a valid
selector expression<C> void subscribeByFilter(String filter, TopicSelector topics, C context, SubscriptionControl.SubscriptionByFilterContextCallback<C> callback)
For each session that matches the filter, new subscriptions will be
established for existing topics that match the provided topic selector
and for which the sessions has READ_TOPIC
permission. The topic
selector will be added to the topic selections of the subscribed session,
and re-evaluated when new topics are added or the session's security
roles change.
A session that does not have SELECT_TOPIC
permission for a topic
cannot subscribe directly, but can be subscribed indirectly using this
method.
C
- context object typefilter
- the session filter expressiontopics
- identifies the topics to subscribe tocontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods to indicate success or failureCompletableFuture<SubscriptionControl.SubscriptionByFilterResult> unsubscribeByFilter(String filter, String topics) throws IllegalArgumentException
This is equivalent to calling
unsubscribeByFilter(String, TopicSelector)
with a selector
parsed using TopicSelectors.parse(String)
.
filter
- the session filter expressiontopics
- the topics to unsubscribe from specified as a
TopicSelector
expression
If the unsubscription was accepted, the CompletableFuture will
complete successfully with a SubscriptionControl.SubscriptionByFilterResult
.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
InvalidFilterException
– if the filter is
invalid;
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
and
VIEW_SESSION
permissions;
SessionClosedException
– if the session is
closed.
IllegalArgumentException
- if topics
is not a valid
selector expressionCompletableFuture<SubscriptionControl.SubscriptionByFilterResult> unsubscribeByFilter(String filter, TopicSelector topics)
filter
- the session filter expressiontopics
- the topics to unsubscribe from specified as a
TopicSelector
expression
If the unsubscription was accepted, the CompletableFuture will
complete successfully with a SubscriptionControl.SubscriptionByFilterResult
.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
InvalidFilterException
– if the filter is
invalid;
SessionSecurityException
– if the calling
session does not have MODIFY_SESSION
and
VIEW_SESSION
global permissions;
SessionClosedException
– if the session is
closed.
void unsubscribeByFilter(String filter, String topics, SubscriptionControl.SubscriptionByFilterCallback callback) throws IllegalArgumentException
This is equivalent to calling
unsubscribeByFilter(String, TopicSelector, SubscriptionByFilterCallback)
with a selector parsed using TopicSelectors.parse(String)
.
filter
- the session filter expressiontopics
- the topics to unsubscribe specified as a
TopicSelector
expressioncallback
- provides callback methods indicating the status of this
operationIllegalArgumentException
- if topics
is not a valid
selector expressionvoid unsubscribeByFilter(String filter, TopicSelector topics, SubscriptionControl.SubscriptionByFilterCallback callback)
filter
- the session filter expressiontopics
- the topics to unsubscribe fromcallback
- provides callback methods indicating the status of this
operation<C> void unsubscribeByFilter(String filter, String topics, C context, SubscriptionControl.SubscriptionByFilterContextCallback<C> callback) throws IllegalArgumentException
This is equivalent to calling
unsubscribeByFilter(String, TopicSelector, SubscriptionByFilterCallback)
with a selector parsed using TopicSelectors.parse(String)
.
C
- context object typefilter
- the session filter expressiontopics
- the topics to unsubscribe specified as a
TopicSelector
expressioncontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods indicating the status of this
operationIllegalArgumentException
- if topics
is not a valid
selector expression<C> void unsubscribeByFilter(String filter, TopicSelector topics, C context, SubscriptionControl.SubscriptionByFilterContextCallback<C> callback)
C
- context object typefilter
- the session filter expressiontopics
- the topics to unsubscribe fromcontext
- passed to the callback with the reply to allow requests
and replies to be correlated. The caller may use any convenient
object reference, including null
callback
- provides callback methods indicating the status of this
operationCopyright © 2020 Push Technology Ltd. All Rights Reserved.