Interface ResponseParameterization<Result>

  • Type Parameters:
    Result - The type of the parameterized class whose objects will be returned in responses. The purpose of this interface is to enable capturing and passing a generic result.

    public interface ResponseParameterization<Result>
    • Method Detail

      • resultType

        default Class<Result> resultType()
        Default method for return class type for Result This only works for classes where the first generic parameter matches the return type Result. If your class has different logic, you can override the method and writing your own logic detecting the class type or explicitly specify the returned class.
        Returns:
        class type for Result
        Throws:
        IllegalArgumentException - if actualTypeArguments length is not equal one.
      • getParameterizedType

        default org.springframework.core.ParameterizedTypeReference<GenericResponse<Result>> getParameterizedType()
        Default method for return ParameterizedTypeReference
        Returns:
        ParameterizedTypeReference GenericResponse with the necessary universal type to use universal queries in RestTemplate used in SpringRESTClientConnector.