public class VanillaWireParser extends Object implements WireParser
This parser uses a default consumer to handle unmatched entries and a field number parselet for numbered fields.
SKIP_READABLE_BYTES| Constructor and Description |
|---|
VanillaWireParser(@NotNull WireParselet defaultConsumer,
@NotNull FieldNumberParselet fieldNumberParselet)
Constructs a new VanillaWireParser with the specified default consumer and field number parselet.
|
| Modifier and Type | Method and Description |
|---|---|
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 input from the wire.
|
@NotNull VanillaWireParser |
register(String keyName,
WireParselet valueInConsumer)
Registers a WireParselet with a keyName.
|
@NotNull VanillaWireParser |
register(@NotNull WireKey key,
WireParselet valueInConsumer)
Registers a new
WireParselet for a given key. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccept, registerOnce, skipReadable, wireParser, wireParserpublic VanillaWireParser(@NotNull
@NotNull WireParselet defaultConsumer,
@NotNull
@NotNull FieldNumberParselet fieldNumberParselet)
defaultConsumer - The default consumer to handle unmatched entries.fieldNumberParselet - The field number parselet for handling numbered fields.public WireParselet getDefaultConsumer()
WireParsergetDefaultConsumer in interface WireParserpublic void parseOne(@NotNull
@NotNull WireIn wireIn)
throws net.openhft.chronicle.core.util.InvocationTargetRuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
parseOne in interface WireParserwireIn - The wire input to parse.net.openhft.chronicle.core.util.InvocationTargetRuntimeException - if an invocation error occurs during parsing.net.openhft.chronicle.core.io.InvalidMarshallableException - if invalid marshallable data is encountered during parsing.@NotNull public @NotNull VanillaWireParser register(@NotNull @NotNull WireKey key, WireParselet valueInConsumer)
WireParserWireParselet for a given key.register in interface WireParserkey - The key to associate the parselet with.valueInConsumer - The parselet to register.@NotNull public @NotNull VanillaWireParser register(String keyName, WireParselet valueInConsumer)
register in interface WireParserkeyName - The name of the key to register.valueInConsumer - The WireParselet associated with the keyName.public WireParselet lookup(CharSequence name)
WireParserWireParselet associated with a given name.lookup in interface WireParsername - The name to search the associated WireParselet for.WireParselet, or null if not found.Copyright © 2024. All rights reserved.