public abstract class ReplyHandler
extends org.jboss.netty.channel.SimpleChannelHandler
Constructor and Description |
---|
ReplyHandler(PeerBean peerBean,
ConnectionBean connectionBean) |
Modifier and Type | Method and Description |
---|---|
Message |
createMessage(PeerAddress recipient,
Message.Command name,
Message.Type type) |
Message |
createResponseMessage(Message message,
Message.Type type) |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
Message |
forwardMessage(Message message) |
ConnectionBean |
getConnectionBean() |
PeerBean |
getPeerBean() |
abstract Message |
handleResponse(Message message,
boolean sign)
If the message is OK, that has been previously checked by the user using
checkMessage, a reply to the message is generated here.
|
protected void |
registerIoHandler(Message.Command... names) |
void |
setSignReply(boolean sign) |
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, handleUpstream, messageReceived, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested
public ReplyHandler(PeerBean peerBean, ConnectionBean connectionBean)
protected void registerIoHandler(Message.Command... names)
public Message createMessage(PeerAddress recipient, Message.Command name, Message.Type type)
public Message createResponseMessage(Message message, Message.Type type)
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
exceptionCaught
in class org.jboss.netty.channel.SimpleChannelHandler
public abstract Message handleResponse(Message message, boolean sign) throws Exception
ch
- Channelmessage
- Request messageException
public void setSignReply(boolean sign)
public PeerBean getPeerBean()
public ConnectionBean getConnectionBean()
Copyright © 2013. All Rights Reserved.