public abstract class HttpRestR66ClientResponseHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpObject>
Note: by default, no connection are closed except in case of error or if in HTTP 1.0 or explicitly to be closed.
Modifier and Type | Field and Description |
---|---|
protected com.fasterxml.jackson.databind.JsonNode |
jsonObject |
Constructor and Description |
---|
HttpRestR66ClientResponseHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
action(io.netty.channel.Channel channel,
RestArgument ra,
HttpRestAbstractR66Handler.ACTIONS_TYPE act)
Method calls when a action REST command is raised as answer
|
protected void |
actionFromResponse(io.netty.channel.Channel channel)
Setting the RestArgument to the RestFuture and validating RestFuture.
|
protected void |
addContent(io.netty.handler.codec.http.FullHttpResponse response) |
protected abstract boolean |
afterDbDelete(io.netty.channel.Channel channel,
RestArgument ra)
Method calls when a REST Delete command is raised as answer
|
protected abstract boolean |
afterDbGet(io.netty.channel.Channel channel,
RestArgument ra)
Method calls when a REST Get command is raised as answer
|
protected abstract boolean |
afterDbGetMultiple(io.netty.channel.Channel channel,
RestArgument ra)
Method calls when a REST GetMultiple command is raised as answer
|
protected abstract boolean |
afterDbOptions(io.netty.channel.Channel channel,
RestArgument ra)
Method calls when a REST Options command is raised as answer
|
protected abstract boolean |
afterDbPost(io.netty.channel.Channel channel,
RestArgument ra)
Method calls when a REST Post command is raised as answer
|
protected abstract boolean |
afterDbPut(io.netty.channel.Channel channel,
RestArgument ra)
Method calls when a REST Put command is raised as answer
|
protected abstract boolean |
afterError(io.netty.channel.Channel channel,
RestArgument ra)
Method calls when a REST command is in error
|
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpObject msg) |
protected boolean |
delete(io.netty.channel.Channel channel,
RestArgument ra) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected boolean |
get(io.netty.channel.Channel channel,
RestArgument ra) |
protected boolean |
options(io.netty.channel.Channel channel,
RestArgument ra) |
protected boolean |
post(io.netty.channel.Channel channel,
RestArgument ra) |
protected boolean |
put(io.netty.channel.Channel channel,
RestArgument ra) |
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
protected void addContent(io.netty.handler.codec.http.FullHttpResponse response) throws HttpIncorrectRequestException
HttpIncorrectRequestException
protected void actionFromResponse(io.netty.channel.Channel channel) throws HttpInvalidAuthenticationException
channel
- HttpInvalidAuthenticationException
protected abstract boolean action(io.netty.channel.Channel channel, RestArgument ra, HttpRestAbstractR66Handler.ACTIONS_TYPE act) throws HttpInvalidAuthenticationException
channel
- ra
- act
- HttpInvalidAuthenticationException
protected abstract boolean afterDbGet(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
channel
- ra
- HttpInvalidAuthenticationException
protected abstract boolean afterDbPost(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
channel
- ra
- HttpInvalidAuthenticationException
protected abstract boolean afterDbPut(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
channel
- ra
- HttpInvalidAuthenticationException
protected abstract boolean afterDbDelete(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
channel
- ra
- HttpInvalidAuthenticationException
protected abstract boolean afterDbGetMultiple(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
channel
- ra
- HttpInvalidAuthenticationException
protected abstract boolean afterDbOptions(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
channel
- ra
- HttpInvalidAuthenticationException
protected abstract boolean afterError(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
channel
- ra
- (might be null)HttpInvalidAuthenticationException
protected boolean get(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
protected boolean put(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
protected boolean post(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
protected boolean delete(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
protected boolean options(io.netty.channel.Channel channel, RestArgument ra) throws HttpInvalidAuthenticationException
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpObject msg) throws Exception
channelRead0
in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpObject>
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2009–2020 Waarp. All rights reserved.