Class SecureChatClientHandler
- java.lang.Object
-
- org.jboss.netty.channel.SimpleChannelUpstreamHandler
-
- org.jboss.netty.example.securechat.SecureChatClientHandler
-
- All Implemented Interfaces:
ChannelHandler
,ChannelUpstreamHandler
public class SecureChatClientHandler extends SimpleChannelUpstreamHandler
Handles a client-side channel.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description SecureChatClientHandler()
-
Method Summary
All 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
handleUpstream(ChannelHandlerContext ctx, ChannelEvent e)
Handles the specified upstream event.void
messageReceived(ChannelHandlerContext ctx, MessageEvent e)
Invoked when a message object (e.g:ChannelBuffer
) was received from a remote peer.-
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, writeComplete
-
-
-
-
Method Detail
-
handleUpstream
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
Description copied from class:SimpleChannelUpstreamHandler
Handles 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:
handleUpstream
in interfaceChannelUpstreamHandler
- Overrides:
handleUpstream
in classSimpleChannelUpstreamHandler
- Parameters:
ctx
- the context object for this handlere
- the upstream event to process or intercept- Throws:
java.lang.Exception
-
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
-
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
-
-