public class StoreClientHandler extends org.jboss.netty.channel.SimpleChannelUpstreamHandler implements Send
Modifier and Type | Field and Description |
---|---|
protected Serializer |
embeddedSerializer |
protected ConcurrentMap<Long,AsynReq> |
map |
protected long |
timeout |
Constructor and Description |
---|
StoreClientHandler() |
StoreClientHandler(long timeout) |
Modifier and Type | Method and Description |
---|---|
void |
channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e) |
void |
channelInterestChanged(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e) |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
void |
handleUpstream(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelEvent e) |
Response |
invoke(Request request,
org.jboss.netty.channel.Channel channel) |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
based upon request type there are different way to handle request payload
Invoker type will just pass through, let client handle the
|
void |
sendMessage(Request request,
org.jboss.netty.channel.Channel channel) |
Response |
sendRequest(Request request,
org.jboss.netty.channel.Channel channel) |
protected long timeout
protected ConcurrentMap<Long,AsynReq> map
protected Serializer embeddedSerializer
public StoreClientHandler(long timeout)
public StoreClientHandler()
public void handleUpstream(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelEvent e) throws Exception
handleUpstream
in interface org.jboss.netty.channel.ChannelUpstreamHandler
handleUpstream
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
public void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
channelConnected
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
public void channelInterestChanged(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
channelInterestChanged
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
exceptionCaught
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
messageReceived
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
ctx
- e
- public Response sendRequest(Request request, org.jboss.netty.channel.Channel channel)
sendRequest
in interface Send
request
- channel
- public void sendMessage(Request request, org.jboss.netty.channel.Channel channel)
sendMessage
in interface Send
Copyright © 2016. All rights reserved.