Class HttpSnoopServerHandler
- java.lang.Object
-
- org.jboss.netty.channel.SimpleChannelUpstreamHandler
-
- org.jboss.netty.example.http.snoop.HttpSnoopServerHandler
-
- All Implemented Interfaces:
ChannelHandler
,ChannelUpstreamHandler
public class HttpSnoopServerHandler extends SimpleChannelUpstreamHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringBuilder
buf
Buffer that stores the response contentprivate boolean
readingChunks
private HttpRequest
request
-
Constructor Summary
Constructors Constructor Description HttpSnoopServerHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
Invoked when an exception was raised by an I/O thread or aChannelHandler
.void
messageReceived(ChannelHandlerContext ctx, MessageEvent e)
Invoked when a message object (e.g:ChannelBuffer
) was received from a remote peer.private static void
send100Continue(MessageEvent e)
private void
writeResponse(MessageEvent e)
-
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
-
-
-
-
Field Detail
-
request
private HttpRequest request
-
readingChunks
private boolean readingChunks
-
buf
private final java.lang.StringBuilder buf
Buffer that stores the response content
-
-
Method Detail
-
messageReceived
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
Description copied from class:SimpleChannelUpstreamHandler
Invoked when a message object (e.g:ChannelBuffer
) was received from a remote peer.- Overrides:
messageReceived
in classSimpleChannelUpstreamHandler
-
writeResponse
private void writeResponse(MessageEvent e)
-
send100Continue
private static void send100Continue(MessageEvent e)
-
exceptionCaught
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
Description copied from class:SimpleChannelUpstreamHandler
Invoked when an exception was raised by an I/O thread or aChannelHandler
.- Overrides:
exceptionCaught
in classSimpleChannelUpstreamHandler
-
-