Class TaskIdSerde
java.lang.Object
io.micronaut.configuration.kafka.streams.health.serde.TaskIdSerde
- All Implemented Interfaces:
io.micronaut.serde.Deserializer<TaskId>
,io.micronaut.serde.Serde<TaskId>
,io.micronaut.serde.Serializer<TaskId>
@Singleton
public final class TaskIdSerde
extends Object
implements io.micronaut.serde.Serde<TaskId>
A custom
Serde
implementation for serializing and deserializing
TaskId
.- See Also:
-
TaskId
Serde
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.Deserializer
io.micronaut.serde.Deserializer.DecoderContext
Nested classes/interfaces inherited from interface io.micronaut.serde.Serializer
io.micronaut.serde.Serializer.EncoderContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable TaskId
deserialize
(@NonNull io.micronaut.serde.Decoder decoder, io.micronaut.serde.Deserializer.DecoderContext context, @NonNull io.micronaut.core.type.Argument<? super TaskId> type) Deserializes aTaskId
from its string representation.void
serialize
(@NonNull io.micronaut.serde.Encoder encoder, io.micronaut.serde.Serializer.EncoderContext context, @NonNull io.micronaut.core.type.Argument<? extends TaskId> type, @NonNull TaskId value) Serializes aTaskId
into its string representation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.serde.Deserializer
allowNull, createSpecific, deserializeNullable, getDefaultValue
Methods inherited from interface io.micronaut.serde.Serializer
createSpecific, isAbsent, isEmpty
-
Constructor Details
-
TaskIdSerde
public TaskIdSerde()
-
-
Method Details
-
deserialize
@Nullable public @Nullable TaskId deserialize(@NonNull @NonNull io.micronaut.serde.Decoder decoder, io.micronaut.serde.Deserializer.DecoderContext context, @NonNull @NonNull io.micronaut.core.type.Argument<? super TaskId> type) throws IOException Deserializes aTaskId
from its string representation.- Specified by:
deserialize
in interfaceio.micronaut.serde.Deserializer<TaskId>
- Parameters:
decoder
- TheDecoder
used to read the input.context
- The deserialization context.type
- TheTaskId
type argument.- Returns:
- The deserialized
TaskId
. - Throws:
IOException
- If an I/O error occurs during deserialization.
-
serialize
public void serialize(@NonNull @NonNull io.micronaut.serde.Encoder encoder, io.micronaut.serde.Serializer.EncoderContext context, @NonNull @NonNull io.micronaut.core.type.Argument<? extends TaskId> type, @NonNull @NonNull TaskId value) throws IOException Serializes aTaskId
into its string representation.- Specified by:
serialize
in interfaceio.micronaut.serde.Serializer<TaskId>
- Parameters:
encoder
- TheEncoder
used to write the serialized output.context
- The serialization context.type
- TheTaskId
type argument.value
- TheTaskId
instance to be serialized.- Throws:
IOException
- If an I/O error occurs during serialization.
-