Class OAuth2ErrorHttpMessageConverter

  • All Implemented Interfaces:
    org.springframework.http.converter.HttpMessageConverter<OAuth2Error>

    public class OAuth2ErrorHttpMessageConverter
    extends org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
    A HttpMessageConverter for an OAuth 2.0 Error.
    Since:
    5.1
    See Also:
    AbstractHttpMessageConverter, OAuth2Error
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,​java.lang.String>,​OAuth2Error> errorConverter  
      protected org.springframework.core.convert.converter.Converter<OAuth2Error,​java.util.Map<java.lang.String,​java.lang.String>> errorParametersConverter  
      • Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected OAuth2Error readInternal​(java.lang.Class<? extends OAuth2Error> clazz, org.springframework.http.HttpInputMessage inputMessage)  
      void setErrorConverter​(org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,​java.lang.String>,​OAuth2Error> errorConverter)
      Sets the Converter used for converting the OAuth 2.0 Error parameters to an OAuth2Error.
      void setErrorParametersConverter​(org.springframework.core.convert.converter.Converter<OAuth2Error,​java.util.Map<java.lang.String,​java.lang.String>> errorParametersConverter)
      Sets the Converter used for converting the OAuth2Error to a Map representation of the OAuth 2.0 Error parameters.
      protected boolean supports​(java.lang.Class<?> clazz)  
      protected void writeInternal​(OAuth2Error oauth2Error, org.springframework.http.HttpOutputMessage outputMessage)  
      • Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter

        addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.http.converter.HttpMessageConverter

        getSupportedMediaTypes
    • Field Detail

      • errorConverter

        protected org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,​java.lang.String>,​OAuth2Error> errorConverter
      • errorParametersConverter

        protected org.springframework.core.convert.converter.Converter<OAuth2Error,​java.util.Map<java.lang.String,​java.lang.String>> errorParametersConverter
    • Constructor Detail

      • OAuth2ErrorHttpMessageConverter

        public OAuth2ErrorHttpMessageConverter()
    • Method Detail

      • supports

        protected boolean supports​(java.lang.Class<?> clazz)
        Specified by:
        supports in class org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
      • readInternal

        protected OAuth2Error readInternal​(java.lang.Class<? extends OAuth2Error> clazz,
                                           org.springframework.http.HttpInputMessage inputMessage)
                                    throws org.springframework.http.converter.HttpMessageNotReadableException
        Specified by:
        readInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
        Throws:
        org.springframework.http.converter.HttpMessageNotReadableException
      • writeInternal

        protected void writeInternal​(OAuth2Error oauth2Error,
                                     org.springframework.http.HttpOutputMessage outputMessage)
                              throws org.springframework.http.converter.HttpMessageNotWritableException
        Specified by:
        writeInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
        Throws:
        org.springframework.http.converter.HttpMessageNotWritableException
      • setErrorConverter

        public final void setErrorConverter​(org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,​java.lang.String>,​OAuth2Error> errorConverter)
        Sets the Converter used for converting the OAuth 2.0 Error parameters to an OAuth2Error.
        Parameters:
        errorConverter - the Converter used for converting to an OAuth2Error
      • setErrorParametersConverter

        public final void setErrorParametersConverter​(org.springframework.core.convert.converter.Converter<OAuth2Error,​java.util.Map<java.lang.String,​java.lang.String>> errorParametersConverter)
        Sets the Converter used for converting the OAuth2Error to a Map representation of the OAuth 2.0 Error parameters.
        Parameters:
        errorParametersConverter - the Converter used for converting to a Map representation of the Error parameters