public interface WireParser extends Consumer<WireIn>
| Modifier and Type | Field and Description |
|---|---|
static FieldNumberParselet |
SKIP_READABLE_BYTES
A predefined parselet that skips all readable bytes in the wire.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
accept(@NotNull WireIn wireIn)
Default implementation for the Consumer's accept method.
|
WireParselet |
getDefaultConsumer()
Retrieves the default consumer of this parser.
|
WireParselet |
lookup(CharSequence name)
Searches for a
WireParselet associated with a given name. |
void |
parseOne(@NotNull WireIn wireIn)
Parses a single field-value data from the provided wire input.
|
@NotNull VanillaWireParser |
register(String keyName,
WireParselet valueInConsumer)
Registers a new
WireParselet for a given key name. |
default @NotNull VanillaWireParser |
register(WireKey key,
WireParselet valueInConsumer)
Registers a new
WireParselet for a given key. |
default @NotNull VanillaWireParser |
registerOnce(WireKey key,
WireParselet valueInConsumer)
Attempts to register a new
WireParselet for a given key. |
static void |
skipReadable(long ignoreMethodId,
WireIn wire)
Skips all readable bytes in the wire.
|
static @NotNull WireParser |
wireParser(WireParselet defaultConsumer)
Creates a new WireParser with a default consumer.
|
static @NotNull WireParser |
wireParser(@NotNull WireParselet defaultConsumer,
@NotNull FieldNumberParselet fieldNumberParselet)
Creates a new WireParser with a default consumer and a custom field number parselet.
|
static final FieldNumberParselet SKIP_READABLE_BYTES
@NotNull static @NotNull WireParser wireParser(WireParselet defaultConsumer)
defaultConsumer - The default consumer that handles the wire data when no specific handler is provided.@NotNull static @NotNull WireParser wireParser(@NotNull @NotNull WireParselet defaultConsumer, @NotNull @NotNull FieldNumberParselet fieldNumberParselet)
defaultConsumer - The default consumer to handle the wire data when no specific handler is provided.fieldNumberParselet - Custom field number parselet to handle field numbers in the wire data.static void skipReadable(long ignoreMethodId,
WireIn wire)
ignoreMethodId - The method ID to ignore. (Currently unused in the method's logic)wire - The wire input source.WireParselet getDefaultConsumer()
void parseOne(@NotNull
@NotNull WireIn wireIn)
throws net.openhft.chronicle.core.util.InvocationTargetRuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
wireIn - The wire input source.net.openhft.chronicle.core.util.InvocationTargetRuntimeException - When there's a failure invoking the target action for a field.net.openhft.chronicle.core.io.InvalidMarshallableException - When the wire data cannot be marshaled into the desired format.default void accept(@NotNull
@NotNull WireIn wireIn)
WireParselet lookup(CharSequence name)
WireParselet associated with a given name.name - The name to search the associated WireParselet for.WireParselet, or null if not found.@NotNull default @NotNull VanillaWireParser registerOnce(WireKey key, WireParselet valueInConsumer)
WireParselet for a given key. If a parselet
is already registered with the same key, a warning is emitted and the new
registration is ignored.key - The key to associate the parselet with.valueInConsumer - The parselet to register.@NotNull default @NotNull VanillaWireParser register(WireKey key, WireParselet valueInConsumer)
WireParselet for a given key.key - The key to associate the parselet with.valueInConsumer - The parselet to register.@NotNull @NotNull VanillaWireParser register(String keyName, WireParselet valueInConsumer)
WireParselet for a given key name.keyName - The name of the key to associate the parselet with.valueInConsumer - The parselet to register.Copyright © 2024. All rights reserved.