Package io.hyperfoil.http.connection
Class BaseResponseHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.hyperfoil.http.connection.BaseResponseHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
Http1xResponseHandler,Http2RawResponseHandler
public abstract class BaseResponseHandler extends io.netty.channel.ChannelInboundHandlerAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected HttpConnectionconnectionprotected intresponseBytes
-
Constructor Summary
Constructors Constructor Description BaseResponseHandler(HttpConnection connection)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleanhandleBuffer(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf, int streamId)protected abstract booleanisRequestStream(int streamId)protected voidonBodyPart(io.netty.buffer.ByteBuf buf, int startOffset, int length, boolean isLastPart)protected voidonCompletion(HttpRequest request)protected voidonData(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf)protected voidonHeaderRead(io.netty.buffer.ByteBuf buf, int startOfName, int endOfName, int startOfValue, int endOfValue)protected voidonRawData(HttpRequest request, io.netty.buffer.ByteBuf data, boolean isLastPart)protected voidonStatus(int status)-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
connection
protected final HttpConnection connection
-
responseBytes
protected int responseBytes
-
-
Constructor Detail
-
BaseResponseHandler
public BaseResponseHandler(HttpConnection connection)
-
-
Method Detail
-
handleBuffer
protected boolean handleBuffer(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf, int streamId) throws java.lang.Exception- Throws:
java.lang.Exception
-
isRequestStream
protected abstract boolean isRequestStream(int streamId)
-
onRawData
protected void onRawData(HttpRequest request, io.netty.buffer.ByteBuf data, boolean isLastPart)
-
onData
protected void onData(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf)
-
onStatus
protected void onStatus(int status)
-
onHeaderRead
protected void onHeaderRead(io.netty.buffer.ByteBuf buf, int startOfName, int endOfName, int startOfValue, int endOfValue)
-
onBodyPart
protected void onBodyPart(io.netty.buffer.ByteBuf buf, int startOffset, int length, boolean isLastPart)
-
onCompletion
protected void onCompletion(HttpRequest request)
-
-