ContextType - Service request context type (will be used as context for request handlers).@ChannelHandler.Sharable
public class DispatcherHandler<ContextType extends ContextInterface>
extends io.netty.channel.ChannelInboundHandlerAdapter
| Constructor and Description |
|---|
DispatcherHandler(ContextType context,
Dispatcher<? super ContextType> dispatcher)
Initializes JSON-RPC binding.
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext session,
Object message)
Handles new message.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext session,
Throwable error)
Handles thrown error.
|
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic DispatcherHandler(ContextType context, Dispatcher<? super ContextType> dispatcher)
context - Execution context.dispatcher - JSON-RPC dispatcher.public void exceptionCaught(io.netty.channel.ChannelHandlerContext session,
Throwable error)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdaptersession - Current connection session.error - Error.public void channelRead(io.netty.channel.ChannelHandlerContext session,
Object message)
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdaptersession - Current connection session.message - Incomming message.Copyright © 2015–2016 RafaĆ Wrzeszcz - Wrzasq.pl. All rights reserved.