Package org.cometd.common
Interface JSONContext.AsyncParser
-
- All Known Implementing Classes:
BufferingJSONAsyncParser,JettyJSONContext.AsyncJSONParser
- Enclosing interface:
- JSONContext<T extends Message.Mutable>
public static interface JSONContext.AsyncParserA non-blocking JSON parser.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <R> Rcomplete()Signals the end of the JSON string content to this parser and returns the parsed object.default voidparse(byte[] bytes, int offset, int length)voidparse(java.nio.ByteBuffer buffer)
-
-
-
Method Detail
-
parse
default void parse(byte[] bytes, int offset, int length)- Parameters:
bytes- the bytes chunk to parseoffset- the offset to start parsing fromlength- the number of bytes to parse
-
parse
void parse(java.nio.ByteBuffer buffer)
- Parameters:
buffer- the buffer chunk to parse
-
complete
<R> R complete()
Signals the end of the JSON string content to this parser and returns the parsed object.
- Type Parameters:
R- the type to cast the result to- Returns:
- the result of the JSON parsing
-
-