public abstract class AbstractResponseHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected ClientConfiguration |
cfg |
protected HChannelManager |
channelManager |
Modifier | Constructor and Description |
---|---|
protected |
AbstractResponseHandler(ClientConfiguration cfg,
HChannelManager channelManager) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleRedirectResponse(PubSubProtocol.PubSubResponse response,
PubSubData pubSubData,
org.jboss.netty.channel.Channel channel)
Logic to repost a PubSubRequest when the server responds with a redirect
indicating they are not the topic master.
|
abstract void |
handleResponse(PubSubProtocol.PubSubResponse response,
PubSubData pubSubData,
org.jboss.netty.channel.Channel channel)
Logic to handle received response.
|
protected final ClientConfiguration cfg
protected final HChannelManager channelManager
protected AbstractResponseHandler(ClientConfiguration cfg, HChannelManager channelManager)
public abstract void handleResponse(PubSubProtocol.PubSubResponse response, PubSubData pubSubData, org.jboss.netty.channel.Channel channel) throws Exception
response
- PubSubResponse received from hub server.pubSubData
- PubSubData for the pub/sub request.channel
- Channel we used to make the request.Exception
protected void handleRedirectResponse(PubSubProtocol.PubSubResponse response, PubSubData pubSubData, org.jboss.netty.channel.Channel channel) throws Exception
response
- PubSubResponse from the server for the redirectpubSubData
- PubSubData for the original PubSubRequest madechannel
- Channel Channel we used to make the original PubSubRequestException
- Throws an exception if there was an error in doing the
redirect repost of the PubSubRequestCopyright © 2015 The Apache Software Foundation. All rights reserved.