Class BaseConfig<S>

    • Constructor Detail

      • BaseConfig

        public BaseConfig()
    • Method Detail

      • codec

        public <T> JsonCodec<T> codec​(Class<T> entityClass)
        Description copied from interface: CodecContext
        Returns the JSON codec for the specified entity class.
        Specified by:
        codec in interface CodecContext
        Type Parameters:
        T - entity type
        Parameters:
        entityClass - entity class
        Returns:
        JSON codec; null if no codec available for the class
      • getService

        public <T> T getService​(Class<T> serviceClass)
        Description copied from interface: CodecContext
        Returns reference to the specified service implementation.
        Specified by:
        getService in interface CodecContext
        Type Parameters:
        T - service type
        Parameters:
        serviceClass - service class
        Returns:
        service implementation; null if no implementation available for the class
      • mapper

        public com.fasterxml.jackson.databind.ObjectMapper mapper()
        Description copied from interface: CodecContext
        Returns the JSON object mapper.
        Specified by:
        mapper in interface CodecContext
        Returns:
        object mapper
      • decode

        protected <T> T decode​(String json,
                               Class<T> entityClass)
        Decodes the specified entity from JSON using codec registered to this context.
        Type Parameters:
        T - entity class type
        Parameters:
        json - JSON String to decode
        entityClass - entity class
        Returns:
        decoded entity