|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.frame.FrameDecoder
net.tomp2p.message.TomP2PDecoderTCP
public class TomP2PDecoderTCP
The decoder first decodes the header. If this has been successful, then if there is payload, then the payload is decoded. The TomP2P decoder can be used to decode several messages in the same session as long as they are sequential. This class is not thread safe.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
---|
org.jboss.netty.channel.ChannelHandler.Sharable |
Field Summary |
---|
Fields inherited from class org.jboss.netty.handler.codec.frame.FrameDecoder |
---|
cumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS |
Constructor Summary | |
---|---|
TomP2PDecoderTCP()
Default constructor with no message size limit. |
|
TomP2PDecoderTCP(int maxMessageSize)
Limits the message size |
Method Summary | |
---|---|
protected Object |
decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
org.jboss.netty.buffer.ChannelBuffer buffer)
|
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e)
|
Methods inherited from class org.jboss.netty.handler.codec.frame.FrameDecoder |
---|
actualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, cleanup, decodeLast, getMaxCumulationBufferCapacity, getMaxCumulationBufferComponents, internalBuffer, isUnfold, messageReceived, newCumulationBuffer, replace, setMaxCumulationBufferCapacity, setMaxCumulationBufferComponents, setUnfold, unfoldAndFireMessageReceived, updateCumulation |
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler |
---|
channelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TomP2PDecoderTCP()
public TomP2PDecoderTCP(int maxMessageSize)
maxMessageSize
- The limit of a message size.Method Detail |
---|
protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, org.jboss.netty.buffer.ChannelBuffer buffer) throws Exception
decode
in class org.jboss.netty.handler.codec.frame.FrameDecoder
Exception
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e) throws Exception
exceptionCaught
in class org.jboss.netty.handler.codec.frame.FrameDecoder
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |