public static interface SubscriptionControl.RoutingSubscriptionRequest
Modifier and Type | Interface and Description |
---|---|
static interface |
SubscriptionControl.RoutingSubscriptionRequest.Handler
Handler for routing subscription requests.
|
Modifier and Type | Method and Description |
---|---|
void |
defer()
Defers the handling of this Routing Topic.
|
SessionId |
getSessionId()
Identifies the client session making the subscription request.
|
String |
getTopicPath()
Identifies the topic that the client is requesting subscribe to.
|
<C> void |
route(String topicPath,
C context,
SubscriptionControl.SubscriptionContextCallback<C> callback)
Provide a topic path to which the requested client will be routed via
the routing topic, with a contextual object.
|
void |
route(String topicPath,
SubscriptionControl.SubscriptionCallback callback)
Provide a topic path to which the requested client will be routed via
the routing topic.
|
SessionId getSessionId()
String getTopicPath()
void defer() throws SessionClosedException
A RoutingSubscriptionRequest
can be used once. If
route()
or defer()
has already been called for this
RoutingSubscriptionRequest
, calling this method will cause a
warning to be logged by the server, but otherwise have no effect.
SessionClosedException
- if session closedvoid route(String topicPath, SubscriptionControl.SubscriptionCallback callback) throws SessionClosedException
A RoutingSubscriptionRequest
can be used once. If
route()
or defer()
has already been called for this
RoutingSubscriptionRequest
, calling this method will cause a
warning to be logged by the server, and callback
to be
discarded
.
topicPath
- the topic path of the resolved source topiccallback
- provides callback methods indicating the status of
this requestSessionClosedException
- if the session is closed<C> void route(String topicPath, C context, SubscriptionControl.SubscriptionContextCallback<C> callback) throws SessionClosedException
The requesting session will receive a subscription notification for with the routing topic's path and the topic specification of the source topic. If the source topic is stateful, the requesting session will also be sent an update for the routing topic path with the current value of the source topic. The existence of the source topic is hidden from the requesting session. Updates to the source topic are forwarded to the session as if they came from the routing topic.
A RoutingSubscriptionRequest
can be used once. If
route()
or defer()
has already been called for this
RoutingSubscriptionRequest
, calling this method will cause a
warning to be logged by the server, and callback
to be
discarded
.
C
- context object typetopicPath
- the topic path of the resolved source topiccontext
- 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 request. If there is no topic bound to topicPath
,
the callback with be discarded
.SessionClosedException
- if the session is closedCopyright © 2016 Push Technology Ltd. All Rights Reserved.