Modifier | Constructor and Description |
---|---|
protected |
HChannelImpl(InetSocketAddress host,
AbstractHChannelManager channelManager)
Create a un-established channel with provided target
host . |
|
HChannelImpl(InetSocketAddress host,
AbstractHChannelManager channelManager,
ClientChannelPipelineFactory pipelineFactory) |
|
HChannelImpl(InetSocketAddress host,
org.jboss.netty.channel.Channel channel,
AbstractHChannelManager channelManager,
ClientChannelPipelineFactory pipelineFactory)
Create a
HChannel with an established netty channel. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the channel without waiting.
|
void |
close(boolean wait)
Close the channel
|
protected org.jboss.netty.channel.ChannelFuture |
connect(InetSocketAddress serverHost,
ClientChannelPipelineFactory pipelineFactory)
This is a helper method to do the connect attempt to the server given the
inputted host/port.
|
org.jboss.netty.channel.Channel |
getChannel() |
static HChannelHandler |
getHChannelHandlerFromChannel(org.jboss.netty.channel.Channel channel)
Helper static method to get the ResponseHandler instance from a Channel
via the ChannelPipeline it is associated with.
|
protected void |
retryOrFailOp(PubSubData pubSubData)
Re-submit operation to default server or fail it.
|
void |
submitOp(PubSubData pubSubData)
Submit a pub/sub request.
|
String |
toString() |
protected HChannelImpl(InetSocketAddress host, AbstractHChannelManager channelManager)
host
.host
- Target host address.channelManager
- Channel manager manages the channels.public HChannelImpl(InetSocketAddress host, AbstractHChannelManager channelManager, ClientChannelPipelineFactory pipelineFactory)
public HChannelImpl(InetSocketAddress host, org.jboss.netty.channel.Channel channel, AbstractHChannelManager channelManager, ClientChannelPipelineFactory pipelineFactory)
HChannel
with an established netty channel.host
- Target host address.channel
- Established Netty channel.channelManager
- Channel manager manages the channels.public void submitOp(PubSubData pubSubData)
HChannel
public org.jboss.netty.channel.Channel getChannel()
getChannel
in interface HChannel
protected void retryOrFailOp(PubSubData pubSubData)
pubSubData
- Pub/Sub Operationprotected org.jboss.netty.channel.ChannelFuture connect(InetSocketAddress serverHost, ClientChannelPipelineFactory pipelineFactory)
serverHost
- Input server host to connect to of type InetSocketAddresspipelineFactory
- PipelineFactory to create response handler to handle responses from
underlying channel.public void close(boolean wait)
HChannel
public void close()
HChannel
public static HChannelHandler getHChannelHandlerFromChannel(org.jboss.netty.channel.Channel channel) throws NoResponseHandlerException
channel
- Channel we are retrieving the ResponseHandler instance forNoResponseHandlerException
Copyright © 2011–2016 The Apache Software Foundation. All rights reserved.