Class JsonCommandSerdes<K,​C>

  • All Implemented Interfaces:
    io.simplesource.kafka.api.CommandSerdes<K,​C>

    public final class JsonCommandSerdes<K,​C>
    extends Object
    implements io.simplesource.kafka.api.CommandSerdes<K,​C>
    • Field Detail

      • keyMapper

        protected final GenericMapper<K,​com.google.gson.JsonElement> keyMapper
      • commandMapper

        protected final GenericMapper<C,​com.google.gson.JsonElement> commandMapper
    • Constructor Detail

      • JsonCommandSerdes

        public JsonCommandSerdes()
      • JsonCommandSerdes

        public JsonCommandSerdes​(GenericMapper<K,​com.google.gson.JsonElement> keyMapper,
                                 GenericMapper<C,​com.google.gson.JsonElement> commandMapper)
    • Method Detail

      • aggregateKey

        public org.apache.kafka.common.serialization.Serde<K> aggregateKey()
        Specified by:
        aggregateKey in interface io.simplesource.kafka.api.CommandSerdes<K,​C>
      • commandRequest

        public org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.model.CommandRequest<K,​C>> commandRequest()
        Specified by:
        commandRequest in interface io.simplesource.kafka.api.CommandSerdes<K,​C>
      • commandId

        public org.apache.kafka.common.serialization.Serde<io.simplesource.api.CommandId> commandId()
        Specified by:
        commandId in interface io.simplesource.kafka.api.CommandSerdes<K,​C>
      • commandResponse

        public org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.model.CommandResponse<K>> commandResponse()
        Specified by:
        commandResponse in interface io.simplesource.kafka.api.CommandSerdes<K,​C>