Class AnalyticsChunkResponseParser
java.lang.Object
com.couchbase.client.core.io.netty.chunk.BaseChunkResponseParser<AnalyticsChunkHeader,AnalyticsChunkRow,AnalyticsChunkTrailer>
com.couchbase.client.core.io.netty.analytics.AnalyticsChunkResponseParser
- All Implemented Interfaces:
ChunkResponseParser<AnalyticsChunkHeader,
AnalyticsChunkRow, AnalyticsChunkTrailer>
public class AnalyticsChunkResponseParser
extends BaseChunkResponseParser<AnalyticsChunkHeader,AnalyticsChunkRow,AnalyticsChunkTrailer>
-
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
-
AnalyticsChunkResponseParser
public AnalyticsChunkResponseParser()
-
-
Method Details
-
doCleanup
protected void doCleanup()Description copied from class:BaseChunkResponseParser
Give subclasses a chance to reset their state.- Specified by:
doCleanup
in classBaseChunkResponseParser<AnalyticsChunkHeader,
AnalyticsChunkRow, AnalyticsChunkTrailer>
-
parserBuilder
Description copied from class:BaseChunkResponseParser
Subclass implements this to return the "meat" of the decoding, the chunk parser.- Specified by:
parserBuilder
in classBaseChunkResponseParser<AnalyticsChunkHeader,
AnalyticsChunkRow, AnalyticsChunkTrailer>
-
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<AnalyticsChunkHeader,
AnalyticsChunkRow, AnalyticsChunkTrailer>
-