public class QuoteOfTheMomentServerHandler extends SimpleChannelUpstreamHandler
ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
quotes |
private static java.util.Random |
random |
| Constructor and Description |
|---|
QuoteOfTheMomentServerHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
exceptionCaught(ChannelHandlerContext ctx,
ExceptionEvent e)
Invoked when an exception was raised by an I/O thread or a
ChannelHandler. |
void |
messageReceived(ChannelHandlerContext ctx,
MessageEvent e)
Invoked when a message object (e.g:
ChannelBuffer) was received
from a remote peer. |
private static java.lang.String |
nextQuote() |
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeCompleteprivate static final java.util.Random random
private static final java.lang.String[] quotes
private static java.lang.String nextQuote()
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
SimpleChannelUpstreamHandlerChannelBuffer) was received
from a remote peer.messageReceived in class SimpleChannelUpstreamHandlerpublic void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
SimpleChannelUpstreamHandlerChannelHandler.exceptionCaught in class SimpleChannelUpstreamHandler