Class InetAddressSerde
java.lang.Object
io.micronaut.serde.support.serdes.InetAddressSerde
- All Implemented Interfaces:
Deserializer<InetAddress>,Serde<InetAddress>,Serializer<InetAddress>
Serde implementation of InetAddress.
This is a based on `com.fasterxml.jackson.databind.ser.std.InetAddressSerializer` which is licenced under the Apache 2.0 licence.-
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 TypeMethodDescription@Nullable InetAddressdeserialize(@NonNull Decoder decoder, @NonNull Deserializer.DecoderContext context, @NonNull io.micronaut.core.type.Argument<? super InetAddress> type) Deserializes from the current state of theDecoderan object of typeDeserializer.voidserialize(@NonNull Encoder encoder, @NonNull Serializer.EncoderContext context, @NonNull io.micronaut.core.type.Argument<? extends InetAddress> type, @NonNull InetAddress 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
-
InetAddressSerde
-
-
Method Details
-
deserialize
@Nullable public @Nullable InetAddress deserialize(@NonNull @NonNull Decoder decoder, @NonNull @NonNull Deserializer.DecoderContext context, @NonNull @NonNull io.micronaut.core.type.Argument<? super InetAddress> type) throws IOException Description copied from interface:DeserializerDeserializes from the current state of theDecoderan object of typeDeserializer.- Specified by:
deserializein interfaceDeserializer<InetAddress>- Parameters:
decoder- The decoder, nevernullcontext- 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
-
serialize
public void serialize(@NonNull @NonNull Encoder encoder, @NonNull @NonNull Serializer.EncoderContext context, @NonNull @NonNull io.micronaut.core.type.Argument<? extends InetAddress> type, @NonNull @NonNull InetAddress value) throws IOException Description copied from interface:SerializerSerializes the given value using the passedEncoder.- Specified by:
serializein interfaceSerializer<InetAddress>- 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
-