Record Class OutputSerializationSupportContext<T>

java.lang.Object
java.lang.Record
net.solarnetwork.central.support.OutputSerializationSupportContext<T>
Record Components:
jsonObjectMapper - the ObjectMapper to use for JSON
cborObjectMapper - the ObjectMapper to ues for CBOR
jsonSerializer - the serializer to use for JSON/CBOR output
registrar - a property serializer registrar for non-JSON/CBOR output

public record OutputSerializationSupportContext<T>(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper, com.fasterxml.jackson.databind.JsonSerializer<T> jsonSerializer, net.solarnetwork.codec.PropertySerializerRegistrar registrar) extends Record
Supporting services for output serialization.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OutputSerializationSupportContext(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper, com.fasterxml.jackson.databind.JsonSerializer<T> jsonSerializer, net.solarnetwork.codec.PropertySerializerRegistrar registrar)
    Creates an instance of a OutputSerializationSupportContext record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.ObjectMapper
    Returns the value of the cborObjectMapper record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    com.fasterxml.jackson.databind.ObjectMapper
    Returns the value of the jsonObjectMapper record component.
    com.fasterxml.jackson.databind.JsonSerializer<T>
    Returns the value of the jsonSerializer record component.
    net.solarnetwork.codec.PropertySerializerRegistrar
    Returns the value of the registrar record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OutputSerializationSupportContext

      public OutputSerializationSupportContext(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper, com.fasterxml.jackson.databind.JsonSerializer<T> jsonSerializer, net.solarnetwork.codec.PropertySerializerRegistrar registrar)
      Creates an instance of a OutputSerializationSupportContext record class.
      Parameters:
      jsonObjectMapper - the value for the jsonObjectMapper record component
      cborObjectMapper - the value for the cborObjectMapper record component
      jsonSerializer - the value for the jsonSerializer record component
      registrar - the value for the registrar record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • jsonObjectMapper

      public com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper()
      Returns the value of the jsonObjectMapper record component.
      Returns:
      the value of the jsonObjectMapper record component
    • cborObjectMapper

      public com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper()
      Returns the value of the cborObjectMapper record component.
      Returns:
      the value of the cborObjectMapper record component
    • jsonSerializer

      public com.fasterxml.jackson.databind.JsonSerializer<T> jsonSerializer()
      Returns the value of the jsonSerializer record component.
      Returns:
      the value of the jsonSerializer record component
    • registrar

      public net.solarnetwork.codec.PropertySerializerRegistrar registrar()
      Returns the value of the registrar record component.
      Returns:
      the value of the registrar record component