@Deprecated public interface TopicSubscriptionHandler
If such a handler is declared then all requested subscriptions will be passed to it to authorise. The handler may choose to delegate authorisation to some asynchronous process and defer subscription until authorisation is complete.
The handler must be declared in TopicDefinition
specified when the
Topic is created (see TopicProperty.SUBSCRIPTION_HANDLER
).
Modifier and Type | Method and Description |
---|---|
boolean |
clientSubscriptionRequest(TopicClient client,
Topic topic)
Deprecated.
This is called before a client is actually subscribed to the Topic and it
allows for additional validation or delegation of the authorisation to
some asynchronous process.
|
boolean clientSubscriptionRequest(TopicClient client, Topic topic) throws AuthorisationException
If this returns true then the Topic will be immediately subscribed. If
this returns false then the Topic will not be subscribed at this point in
time. The latter option allows the method to take the subscription
request and perform some asynchronous subscription request which can
ultimately cause the subscription using the
Topic.subscribe(TopicClient)
method.
client
- the Client requesting subscriptiontopic
- the Topic.AuthorisationException
- if the specified Client is not authorised
to be subscribed to the given Topic.Copyright © 2016 Push Technology Ltd. All Rights Reserved.