Class ViewChunkResponseParser
java.lang.Object
com.couchbase.client.core.io.netty.chunk.BaseChunkResponseParser<ViewChunkHeader,ViewChunkRow,ViewChunkTrailer>
com.couchbase.client.core.io.netty.view.ViewChunkResponseParser
- All Implemented Interfaces:
ChunkResponseParser<ViewChunkHeader,
ViewChunkRow, ViewChunkTrailer>
public class ViewChunkResponseParser
extends BaseChunkResponseParser<ViewChunkHeader,ViewChunkRow,ViewChunkTrailer>
Parses the individual response http chunks for a view request.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Give subclasses a chance to reset their state.error()
If the parser sees an error, it should fill this optional so that if the IO layer needs to fail the topmost future it will be passed in.header
(boolean lastChunk) Once the header is completely available, returns a non-absent value of it.protected JsonStreamParser.Builder
Subclass implements this to return the "meat" of the decoding, the chunk parser.void
Called when the JSON stream has been parsed completely and successfully.Methods inherited from class com.couchbase.client.core.io.netty.chunk.BaseChunkResponseParser
cleanup, completeRows, completeTrailer, decodingFailure, emitRow, endOfInput, failRows, feed, initialize, isHeaderComplete, markHeaderComplete, requestContext, responseHeader, rows, trailer, updateRequestContext, updateResponseHeader
-
Constructor Details
-
ViewChunkResponseParser
public ViewChunkResponseParser()
-
-
Method Details
-
parserBuilder
Description copied from class:BaseChunkResponseParser
Subclass implements this to return the "meat" of the decoding, the chunk parser.- Specified by:
parserBuilder
in classBaseChunkResponseParser<ViewChunkHeader,
ViewChunkRow, ViewChunkTrailer>
-
doCleanup
protected void doCleanup()Description copied from class:BaseChunkResponseParser
Give subclasses a chance to reset their state.- Specified by:
doCleanup
in classBaseChunkResponseParser<ViewChunkHeader,
ViewChunkRow, ViewChunkTrailer>
-
header
Description copied from interface:ChunkResponseParser
Once the header is completely available, returns a non-absent value of it.It is important to provide a non-absent value even if some parts are optional because the related IO components will only proceed if a header is available eventually.
- Parameters:
lastChunk
- if we are currently parsing the last chunk.
-
error
Description copied from interface:ChunkResponseParser
If the parser sees an error, it should fill this optional so that if the IO layer needs to fail the topmost future it will be passed in. -
signalComplete
public void signalComplete()Description copied from class:BaseChunkResponseParser
Called when the JSON stream has been parsed completely and successfully.- Specified by:
signalComplete
in classBaseChunkResponseParser<ViewChunkHeader,
ViewChunkRow, ViewChunkTrailer>
-