Class HealthStatusSerde
java.lang.Object
io.micronaut.serde.support.serdes.HealthStatusSerde
- All Implemented Interfaces:
Deserializer<io.micronaut.health.HealthStatus>
,Serde<io.micronaut.health.HealthStatus>
,Serializer<io.micronaut.health.HealthStatus>
@Singleton
@Requires(classes=io.micronaut.health.HealthStatus.class)
public class HealthStatusSerde
extends Object
implements Serde<io.micronaut.health.HealthStatus>
Serde for health status.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.Deserializer
Deserializer.DecoderContext
Nested classes/interfaces inherited from interface io.micronaut.serde.Serializer
Serializer.EncoderContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.health.HealthStatus
deserialize
(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super io.micronaut.health.HealthStatus> type) Deserializes from the current state of theDecoder
an object of typeDeserializer
.void
serialize
(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends io.micronaut.health.HealthStatus> type, io.micronaut.health.HealthStatus value) Serializes the given value using the passedEncoder
.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
-
HealthStatusSerde
public HealthStatusSerde()
-
-
Method Details
-
serialize
public void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends io.micronaut.health.HealthStatus> type, io.micronaut.health.HealthStatus value) throws IOException Description copied from interface:Serializer
Serializes the given value using the passedEncoder
.- Specified by:
serialize
in interfaceSerializer<io.micronaut.health.HealthStatus>
- Parameters:
encoder
- The encoder to usecontext
- The encoder context, nevernull
type
- Models the generic type of the valuevalue
- The value, can benull
- Throws:
IOException
- If an error occurs during serialization
-
deserialize
public io.micronaut.health.HealthStatus deserialize(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super io.micronaut.health.HealthStatus> type) throws IOException Description copied from interface:Deserializer
Deserializes from the current state of theDecoder
an object of typeDeserializer
.- Specified by:
deserialize
in interfaceDeserializer<io.micronaut.health.HealthStatus>
- Parameters:
decoder
- The decoder, nevernull
decoderContext
- The decoder context, nevernull
type
- The generic type to be deserialized- Returns:
- The deserialized object or
null
only ifDeserializer.allowNull()
returnstrue
- Throws:
IOException
- If an error occurs during deserialization of the object
-