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.DecoderContextNested classes/interfaces inherited from interface io.micronaut.serde.Serializer
Serializer.EncoderContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.health.HealthStatusdeserialize(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super io.micronaut.health.HealthStatus> type) Deserializes from the current state of theDecoderan object of typeDeserializer.voidserialize(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, waitMethods inherited from interface io.micronaut.serde.Deserializer
allowNull, createSpecific, deserializeNullable, getDefaultValueMethods 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:SerializerSerializes the given value using the passedEncoder.- Specified by:
serializein interfaceSerializer<io.micronaut.health.HealthStatus>- Parameters:
encoder- The encoder to usecontext- The encoder context, nevernulltype- 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:DeserializerDeserializes from the current state of theDecoderan object of typeDeserializer.- Specified by:
deserializein interfaceDeserializer<io.micronaut.health.HealthStatus>- Parameters:
decoder- The decoder, nevernulldecoderContext- The decoder context, nevernulltype- The generic type to be deserialized- Returns:
- The deserialized object or
nullonly ifDeserializer.allowNull()returnstrue - Throws:
IOException- If an error occurs during deserialization of the object
-