@ChannelHandler.Sharable
public class RequestHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
| Constructor and Description |
|---|
RequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext session)
Handles session closing.
|
void |
channelRead(io.netty.channel.ChannelHandlerContext session,
Object message)
Handles new message.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext session,
Throwable error)
Handles thrown error.
|
Future<com.thetransactioncompany.jsonrpc2.JSONRPC2Response> |
execute(com.thetransactioncompany.jsonrpc2.JSONRPC2Request request)
Generates response future.
|
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic Future<com.thetransactioncompany.jsonrpc2.JSONRPC2Response> execute(com.thetransactioncompany.jsonrpc2.JSONRPC2Request request)
request - JSON-RPC request.public void channelInactive(io.netty.channel.ChannelHandlerContext session)
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdaptersession - Closed connection session.public void channelRead(io.netty.channel.ChannelHandlerContext session,
Object message)
throws com.thetransactioncompany.jsonrpc2.JSONRPC2ParseException
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdaptersession - Current connection session.message - Incomming message.com.thetransactioncompany.jsonrpc2.JSONRPC2ParseException - Error occured when parsing response.public void exceptionCaught(io.netty.channel.ChannelHandlerContext session,
Throwable error)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdaptersession - Current connection session.error - Error.Exception - Exception that triggered the event.Copyright © 2015–2016 RafaĆ Wrzeszcz - Wrzasq.pl. All rights reserved.