public interface DocumentContext extends Closeable, SourceContext
| Modifier and Type | Field and Description |
|---|---|
static DocumentContext |
NOOP |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
default boolean |
isData()
Checks if the
DocumentContext is data. |
boolean |
isMetaData()
Checks it the
DocumentContext is metadata. |
boolean |
isNotComplete() |
default boolean |
isOpen() |
boolean |
isPresent()
Checks if the
DocumentContext is present. |
void |
reset()
call close once, then discard any remaining state
|
default void |
rollbackOnClose()
Call this if you have detected an error condition and you want the context
rolled back when it is closed, rather than half a message committed
|
@Nullable Wire |
wire()
Returns the
Wire associated with the Document. |
index, sourceIdstatic final DocumentContext NOOP
boolean isMetaData()
DocumentContext is metadata. If it is, true is
returned, otherwise false.boolean isPresent()
DocumentContext is present. If it is, true is returned,
otherwise false.default boolean isData()
DocumentContext is data. If it is, true is returned,
otherwise false@Nullable @Nullable Wire wire()
Wire associated with the Document. It is possible that
null is returned, depending on the implementation.Wire associated with the Document.boolean isNotComplete()
default boolean isOpen()
default void rollbackOnClose()
void close()
close in interface AutoCloseableclose in interface Closeablevoid reset()
Copyright © 2023. All rights reserved.