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
  • 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 passed Encoder.
      Specified by:
      serialize in interface Serializer<io.micronaut.health.HealthStatus>
      Parameters:
      encoder - The encoder to use
      context - The encoder context, never null
      type - Models the generic type of the value
      value - The value, can be null
      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 the Decoder an object of type Deserializer.
      Specified by:
      deserialize in interface Deserializer<io.micronaut.health.HealthStatus>
      Parameters:
      decoder - The decoder, never null
      decoderContext - The decoder context, never null
      type - The generic type to be deserialized
      Returns:
      The deserialized object or null only if Deserializer.allowNull() returns true
      Throws:
      IOException - If an error occurs during deserialization of the object