Package org.jboss.netty.handler.timeout
Class IdleStateAwareChannelHandler
- java.lang.Object
-
- org.jboss.netty.channel.SimpleChannelHandler
-
- org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler
-
- All Implemented Interfaces:
ChannelDownstreamHandler,ChannelHandler,ChannelUpstreamHandler
public class IdleStateAwareChannelHandler extends SimpleChannelHandler
An extendedSimpleChannelHandlerthat adds the handler method for anIdleStateEvent.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description IdleStateAwareChannelHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelIdle(ChannelHandlerContext ctx, IdleStateEvent e)Invoked when aChannelhas been idle for a while.voidhandleUpstream(ChannelHandlerContext ctx, ChannelEvent e)Handles the specified upstream event.-
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleDownstream, messageReceived, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested
-
-
-
-
Method Detail
-
handleUpstream
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
Description copied from class:SimpleChannelHandlerHandles the specified upstream event. Down-casts the received upstream event into more meaningful sub-type event and calls an appropriate handler method with the down-casted event.- Specified by:
handleUpstreamin interfaceChannelUpstreamHandler- Overrides:
handleUpstreamin classSimpleChannelHandler- Parameters:
ctx- the context object for this handlere- the upstream event to process or intercept- Throws:
java.lang.Exception
-
channelIdle
public void channelIdle(ChannelHandlerContext ctx, IdleStateEvent e) throws java.lang.Exception
Invoked when aChannelhas been idle for a while.- Throws:
java.lang.Exception
-
-