public class MultiplexSubscribeResponseHandler extends AbstractSubscribeResponseHandler
aChannelManager, disconnectLock, subscriptions
cfg, channelManager
Modifier | Constructor and Description |
---|---|
protected |
MultiplexSubscribeResponseHandler(ClientConfiguration cfg,
HChannelManager channelManager) |
Modifier and Type | Method and Description |
---|---|
void |
asyncCloseSubscription(TopicSubscriber topicSubscriber,
Callback<PubSubProtocol.ResponseBody> callback,
Object context)
Close subscription from this handler.
|
void |
handleResponse(PubSubProtocol.PubSubResponse response,
PubSubData pubSubData,
org.jboss.netty.channel.Channel channel)
Logic to handle received response.
|
protected Either<PubSubProtocol.StatusCode,HChannel> |
handleSuccessResponse(TopicSubscriber ts,
PubSubData pubSubData,
org.jboss.netty.channel.Channel channel)
Handle success response for a specific TopicSubscriber
ts . |
asyncMessageDeliver, consume, createActiveSubscriber, getActiveSubscriber, getConfiguration, getHChannelManager, handleSubscribeMessage, handleSubscriptionEvent, hasSubscription, messageConsumed, onChannelDisconnected, postHandleSuccessResponse, processSubscriptionEvent, removeSubscription, resubscribeIfNecessary, startDelivery, stopDelivery
handleRedirectResponse
protected MultiplexSubscribeResponseHandler(ClientConfiguration cfg, HChannelManager channelManager)
public void handleResponse(PubSubProtocol.PubSubResponse response, PubSubData pubSubData, org.jboss.netty.channel.Channel channel) throws Exception
AbstractResponseHandler
handleResponse
in class AbstractSubscribeResponseHandler
response
- PubSubResponse received from hub server.pubSubData
- PubSubData for the pub/sub request.channel
- Channel we used to make the request.Exception
protected Either<PubSubProtocol.StatusCode,HChannel> handleSuccessResponse(TopicSubscriber ts, PubSubData pubSubData, org.jboss.netty.channel.Channel channel)
AbstractSubscribeResponseHandler
ts
. The method
is triggered after subscribed successfully.handleSuccessResponse
in class AbstractSubscribeResponseHandler
ts
- Topic Subscriber.pubSubData
- Pub/Sub Request data for this subscribe request.channel
- Subscription Channel.public void asyncCloseSubscription(TopicSubscriber topicSubscriber, Callback<PubSubProtocol.ResponseBody> callback, Object context)
SubscribeResponseHandler
asyncCloseSubscription
in class SubscribeResponseHandler
topicSubscriber
- Topic Subscribercallback
- Callback when the subscription is closed.context
- Callback context.Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.